From 93420a312cd1e00978bd30d2ec4d0ccc160c086c Mon Sep 17 00:00:00 2001 From: dexter <178529795@qq.com> Date: Sat, 18 Feb 2023 23:10:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dhandshake=E5=8F=91=E9=80=81S0?= =?UTF-8?q?S1S2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handshake.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/handshake.go b/handshake.go index 8e6d5fb..031f858 100644 --- a/handshake.go +++ b/handshake.go @@ -114,10 +114,9 @@ func (nc *NetConnection) simple_handshake(C1 []byte) error { util.PutBE(S0S1[1:5], time.Now().Unix()&0xFFFFFFFF) copy(S0S1[5:], "Monibuca") nc.Write(S0S1) + nc.Write(C1) // S2 if C2 := ReadBuf(nc.Reader, C1S1_SIZE); bytes.Compare(C2[8:], S0S1[9:]) != 0 { return errors.New("C2 Error") - } else { - nc.Write(C2) //S2 } return nil }