mirror of https://bitbucket.org/ausocean/av.git
Ported sockbufsend
This commit is contained in:
parent
86dba64125
commit
fe53876c4f
|
@ -36,6 +36,7 @@ package rtmp
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <rtmp.h>
|
#include <rtmp.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
RTMPT_OPEN=0, RTMPT_SEND, RTMPT_IDLE, RTMPT_CLOSE
|
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
|
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
|
// TODO: port RTMP_METHOD
|
||||||
func avQueue(vals **C.RTMP_METHOD, num *int, av *C.AVal, txn int) {
|
func avQueue(vals **C.RTMP_METHOD, num *int, av *C.AVal, txn int) {
|
||||||
var rtmpMethodPtr *C.RTMP_METHOD
|
var rtmpMethodPtr *C.RTMP_METHOD
|
||||||
|
|
Loading…
Reference in New Issue