新增http

This commit is contained in:
duanhf2012
2020-04-05 17:33:21 +08:00
parent 50d8c41b56
commit bedb715c6d
5 changed files with 658 additions and 1 deletions

View File

@@ -97,7 +97,7 @@ func (p *MsgParser) Read(conn *TCPConn) ([]byte, error) {
} else if msgLen < p.minMsgLen {
return nil, errors.New("message too short")
}
msgLen -= 2
// data
msgData := make([]byte, msgLen)