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 15:29:25 +05:00
|
|
|
func NegotiateConnect(conn net.Conn, params *ProtocolParams, open_chnkstrms map[uint32]*ChunkStream, open_msgs map[uint32]*Message, chunk_bufs *ChunkBuffers) (bool) {
|
|
|
|
for {
|
|
|
|
full_msg_ptr, err := ReadChunk(conn, open_chnkstrms, open_msgs, params.peer_chunk_size, chunk_bufs, &(params.curr_read))
|
|
|
|
if err != nil {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
if full_msg_ptr == nil {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
fmt.Println(*full_msg_ptr)
|
2023-08-10 03:24:00 +05:00
|
|
|
}
|
2023-08-09 16:00:21 +05:00
|
|
|
}
|