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