24 lines
548 B
Go
24 lines
548 B
Go
package rtmp
|
|
|
|
|
|
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
|
|
}
|
|
if err := chnk_wrp_ptr.WriteConnectResponse(); err != nil {
|
|
return false
|
|
}
|
|
return true
|
|
}
|