From 159a21c73a6179cdf67488ef84c22bae63218e8d Mon Sep 17 00:00:00 2001 From: saxon Date: Sat, 28 Jul 2018 15:41:38 +0930 Subject: [PATCH] using my writeN tested and worked, but still using C readN --- rtmp/rtmp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index 31fc7173..2dd65c25 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -733,7 +733,6 @@ func rtmpConnect1(r *C.RTMP, cp *C.RTMPPacket) int { } // TODO: complete this - func handShake(r *C.RTMP, FP9HandShake int32) int { var bMatch int //uptime := uint32(0) @@ -764,7 +763,8 @@ func handShake(r *C.RTMP, FP9HandShake int32) int { } // TODO: port this - if readN(r, (*byte)(unsafe.Pointer(&typ)), 1) != 1 { + if C.ReadN(r, (*C.char)(unsafe.Pointer(&typ)), 1) != 1 { + // if readN(r, (*byte)(unsafe.Pointer(&typ)), 1) != 1 { return 0 }