From fe53876c4f03c1df8f1133e6f378c63798447eea Mon Sep 17 00:00:00 2001 From: saxon Date: Thu, 19 Jul 2018 15:23:06 +0930 Subject: [PATCH] Ported sockbufsend --- rtmp/rtmp.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rtmp/rtmp.go b/rtmp/rtmp.go index 671836a0..7f9515fd 100644 --- a/rtmp/rtmp.go +++ b/rtmp/rtmp.go @@ -36,6 +36,7 @@ package rtmp #include #include #include +#include typedef enum { RTMPT_OPEN=0, RTMPT_SEND, RTMPT_IDLE, RTMPT_CLOSE @@ -798,6 +799,10 @@ func httpPost(r *C.RTMP, cmd C.RTMPTCmd, buf *byte, l int) int { return hlen } +func sockBufSend(sb *C.RTMPSockBuf, buf *byte, l int32) int32 { + return int32(C.send(sb.sb_socket, unsafe.Pointer(buf), C.size_t(l), 0)) +} + // TODO: port RTMP_METHOD func avQueue(vals **C.RTMP_METHOD, num *int, av *C.AVal, txn int) { var rtmpMethodPtr *C.RTMP_METHOD