修改包头

This commit is contained in:
duanhf2012
2020-04-14 11:22:09 +08:00
parent 57708ec822
commit a6ba009120

View File

@@ -133,7 +133,7 @@ func (p *MsgParser) Write(conn *TCPConn, args ...[]byte) error {
if p.littleEndian {
binary.LittleEndian.PutUint16(msg, uint16(msgLen))
} else {
binary.BigEndian.PutUint16(msg, uint16(msgLen)+uint16(p.lenMsgLen))
binary.BigEndian.PutUint16(msg, uint16(msgLen))
}
case 4:
if p.littleEndian {