Ported sockbufsend

This commit is contained in:
saxon 2018-07-19 15:23:06 +09:30
parent 86dba64125
commit fe53876c4f
1 changed files with 5 additions and 0 deletions

View File

@ -36,6 +36,7 @@ package rtmp
#include <stdlib.h>
#include <string.h>
#include <rtmp.h>
#include <sys/socket.h>
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