From 5bc8a7affca03bad795056e156cf81faa930d7fd Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Thu, 10 Aug 2023 03:24:00 +0500 Subject: [PATCH] Chunk read test --- rtmp/connect.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rtmp/connect.go b/rtmp/connect.go index d5af7a9..002521b 100644 --- a/rtmp/connect.go +++ b/rtmp/connect.go @@ -2,8 +2,20 @@ package rtmp import ( "net" + "fmt" ) func NegotiateConnect(conn net.Conn) (bool) { + open_chnkstrms, open_msgs := OpenStreamsMapInit() + full_msg_ptr, err := ReadChunk(conn, open_chnkstrms, open_msgs, 4096) + if err != nil { + return false + } + fmt.Printf("%08b\n", full_msg_ptr.data) + full_msg_ptr, err = ReadChunk(conn, open_chnkstrms, open_msgs, 4096) + if err != nil { + return false + } + fmt.Printf("%08b\n", full_msg_ptr.data) return false }