stream-server/rtmp/connect.go

21 lines
482 B
Go

package rtmp
import (
"net"
"fmt"
)
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)
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)
if err != nil {
return false
}
fmt.Printf("%08b\n", full_msg_ptr.data)
return false
}