stream-server/rtmp/connect.go
2023-08-10 20:58:01 +05:00

23 lines
438 B
Go

package rtmp
import (
"fmt"
)
func NegotiateConnect(chnk_wrp_ptr *ChunkWrapper) (bool) {
fmt.Println(chnk_wrp_ptr.params.peer_chunk_size)
if err := chnk_wrp_ptr.ReadPeerChunkSize(); err != nil {
return false
}
fmt.Println(chnk_wrp_ptr.params.peer_chunk_size)
for {
full_msg_ptr, err := chnk_wrp_ptr.ReadChunk()
if err != nil {
return false
}
if full_msg_ptr == nil {
continue
}
fmt.Println(*full_msg_ptr)
}
}