stream-server/rtmp/connect.go
2023-08-13 14:43:07 +05:00

25 lines
522 B
Go

package rtmp
import (
"fmt"
)
func NegotiateConnect(chnk_wrp_ptr *ChunkWrapper) (bool) {
if err := chnk_wrp_ptr.ReadPeerChunkSize(); err != nil {
return false
}
if err := chnk_wrp_ptr.ReadConnectCommand(); err != nil {
return false
}
if err := chnk_wrp_ptr.WriteWindowAckSize(); err != nil {
return false
}
if err := chnk_wrp_ptr.WritePeerBandwidth(); err != nil {
return false
}
if err := chnk_wrp_ptr.WriteChunkSize(); err != nil {
return false
}
fmt.Println(chnk_wrp_ptr.params)
return false
}