New server framework, an example, and compressed packet fixed.

This commit is contained in:
Tnze
2021-11-27 15:25:55 +08:00
parent b909621c58
commit ab63acbd7e
13 changed files with 2792 additions and 69 deletions

View File

@ -148,7 +148,7 @@ func handshake(conn net.Conn) (protocol, intention int32, err error) {
// loginSuccess send LoginSuccess packet to client
func loginSuccess(conn net.Conn, name string, uuid uuid.UUID) error {
return conn.WritePacket(pk.Marshal(0x02,
pk.UUID(uuid), //uuid as string with hyphens
pk.UUID(uuid),
pk.String(name),
))
}