stream-server/rtmp/connect.go

24 lines
438 B
Go
Raw Normal View History

2023-08-09 16:00:21 +05:00
package rtmp
import (
2023-08-10 03:24:00 +05:00
"fmt"
2023-08-09 16:00:21 +05:00
)
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)
2023-08-10 15:29:25 +05:00
for {
full_msg_ptr, err := chnk_wrp_ptr.ReadChunk()
2023-08-10 15:29:25 +05:00
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
}