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])