This commit is contained in:
aozhiwei 2023-09-15 15:34:07 +08:00
parent 05f5ccedec
commit bda6cd38df
2 changed files with 7 additions and 1 deletions

View File

@ -103,6 +103,12 @@ func (this *WSProxyPackHead_C) Read(data []byte, offset int) {
data[offset + 6], data[offset + 7])
this.MagicCode = q5.MkUInt16(data[offset + 8], data[offset + 9])
this.SocketHandle = q5.MkUInt16(data[offset + 10], data[offset + 11])
this.IpSaddr = uint64(q5.MkInt64(
int32(q5.MkUInt32(data[offset + 16], data[offset + 17],
data[offset + 18], data[offset + 17])),
int32(q5.MkUInt32(data[offset + 20], data[offset + 21],
data[offset + 22], data[offset + 23])),
))
}
func (this *WSProxyPackHead_S) Write(data []byte, offset int) {

View File

@ -5,7 +5,7 @@ import (
)
const (
WSPROXYPACKHEAD_C_SIZE = 20
WSPROXYPACKHEAD_C_SIZE = 24
WSPROXYPACKHEAD_S_SIZE = 16
NET_MSG_MAGIC_CODE = uint16('K') + uint16('S')<<8
)