mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-21 12:14:45 +08:00
修改包头
This commit is contained in:
@@ -133,7 +133,7 @@ func (p *MsgParser) Write(conn *TCPConn, args ...[]byte) error {
|
|||||||
if p.littleEndian {
|
if p.littleEndian {
|
||||||
binary.LittleEndian.PutUint16(msg, uint16(msgLen))
|
binary.LittleEndian.PutUint16(msg, uint16(msgLen))
|
||||||
} else {
|
} else {
|
||||||
binary.BigEndian.PutUint16(msg, uint16(msgLen)+uint16(p.lenMsgLen))
|
binary.BigEndian.PutUint16(msg, uint16(msgLen))
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
if p.littleEndian {
|
if p.littleEndian {
|
||||||
|
|||||||
Reference in New Issue
Block a user