From 7c4682d82b60d39963b55f9bd7f5db567067f022 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 14 Aug 2023 13:33:49 +0800 Subject: [PATCH] 1 --- prototils.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/prototils.go b/prototils.go index f446eab..612f38f 100644 --- a/prototils.go +++ b/prototils.go @@ -81,6 +81,13 @@ func (this *WspCliConn) Reset() { this.SocketHandle = 0 } +func (this *MsgHdr) GetSocket() WspCliConn{ + socket := WspCliConn{} + socket.Conn = this.Conn + socket.SocketHandle = this.SocketHandle + return socket +} + func (this *WSProxyPackHead_C) Read(data []byte, offset int) { this.PackLen = q5.MkUInt16(data[offset + 0], data[offset + 1]) this.MsgId = q5.MkUInt16(data[offset + 2], data[offset + 3])