diff --git a/rtmp/server.go b/rtmp/server.go index 08edba8..ed6b474 100644 --- a/rtmp/server.go +++ b/rtmp/server.go @@ -4,6 +4,13 @@ import ( "net" ) +type ProtocolParams struct { + peer_chunk_size uint32 + chunk_size uint32 + peer_ack_win uint32 + curr_read uint32 +} + func NewServer(port *string) (error) { l, err := net.Listen("tcp", ":" + *port) if err != nil { @@ -33,7 +40,9 @@ func handle_conn(conn net.Conn, stream_live *bool) { if !DoHandshake(conn) { return } - if !NegotiateConnect(conn) { + params := ProtocolParams{1024, 512, 0, 0} + open_chnkstrms, open_msgs, chunk_buffers := OpenStreamsMapInit() + if !NegotiateConnect(conn, ¶ms, open_chnkstrms, open_msgs, chunk_buffers) { return }