Starting to port SocksNegotiate

This commit is contained in:
saxon 2018-08-11 02:24:50 +09:30
parent e6c62026d7
commit 504c79ab27
1 changed files with 5 additions and 0 deletions

View File

@ -1076,6 +1076,7 @@ func C_RTMP_Connect0(r *C.RTMP, service *C.sockaddr) int {
log.Println("C_RTMP_Connect0: socks negotiation.") log.Println("C_RTMP_Connect0: socks negotiation.")
} }
// TODO: port this
if C.SocksNegotiate(r) == 0 { if C.SocksNegotiate(r) == 0 {
log.Println("C_RTMP_Connect0: SOCKS negotiation failed.") log.Println("C_RTMP_Connect0: SOCKS negotiation failed.")
return 0 return 0
@ -1103,6 +1104,10 @@ func C_RTMP_Connect0(r *C.RTMP, service *C.sockaddr) int {
return 1 return 1
} }
// int SocksNegotiate(RTMP* r);
// rtmp.c +1062
// TODO: find location in c file
func SET_RCVTIMEO(tv *int32, s int32) { func SET_RCVTIMEO(tv *int32, s int32) {
*tv = s * 1000 *tv = s * 1000
} }