stream-server/rtmp/connect.go

22 lines
482 B
Go
Raw Normal View History

2023-08-09 16:00:21 +05:00
package rtmp
import (
"net"
2023-08-10 03:24:00 +05:00
"fmt"
2023-08-09 16:00:21 +05:00
)
2023-08-10 01:02:22 +05:00
func NegotiateConnect(conn net.Conn) (bool) {
open_chnkstrms, open_msgs, chunk_bufs := OpenStreamsMapInit()
full_msg_ptr, err := ReadChunk(conn, open_chnkstrms, open_msgs, 4096, chunk_bufs)
2023-08-10 03:24:00 +05:00
if err != nil {
return false
}
fmt.Printf("%08b\n", full_msg_ptr.data)
full_msg_ptr, err = ReadChunk(conn, open_chnkstrms, open_msgs, 4096, chunk_bufs)
2023-08-10 03:24:00 +05:00
if err != nil {
return false
}
fmt.Printf("%08b\n", full_msg_ptr.data)
2023-08-10 01:02:22 +05:00
return false
2023-08-09 16:00:21 +05:00
}