From 58d12652e5553faf90f4d4ba45e605cf25397830 Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Thu, 10 Aug 2023 23:52:52 +0500 Subject: [PATCH] Remove chunk size test code, add connect command test code --- rtmp/connect.go | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/rtmp/connect.go b/rtmp/connect.go index 5f91aee..6eb006a 100644 --- a/rtmp/connect.go +++ b/rtmp/connect.go @@ -5,19 +5,12 @@ import ( ) 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) + if err := chnk_wrp_ptr.ReadConnectCommand(); err != nil { + return false } + fmt.Println(chnk_wrp_ptr.params) + return false }