Compare commits
2 Commits
e14a04f81c
...
eedb04be56
Author | SHA1 | Date |
---|---|---|
|
eedb04be56 | |
|
a9355a82a9 |
|
@ -144,7 +144,11 @@ func EncodeJavaMessage(status int, cmdID int, dest int, playerUuid string, cmdNu
|
||||||
return raw
|
return raw
|
||||||
}
|
}
|
||||||
|
|
||||||
func DecodeMessage(data []byte) (Status int, CmdID int, Dest int, CmdNumber int, Args string) {
|
func DecodeWebMessage(data []byte) (Status int, CmdID int, Dest int, CmdNumber int, Args string) {
|
||||||
|
if data[0] == StatusReply {
|
||||||
|
return int(data[0]), 0, 0, 0, ""
|
||||||
|
}
|
||||||
|
|
||||||
status := data[0]
|
status := data[0]
|
||||||
cmdID := data[1]
|
cmdID := data[1]
|
||||||
dest := data[2]
|
dest := data[2]
|
||||||
|
|
|
@ -27,7 +27,7 @@ func HandleWebMessage(isVoice bool, conn *websocket.Conn, uuid string, msg []byt
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
status, cmdID, dest, cmdNumber, args := kraProtocol.DecodeMessage(msg)
|
status, cmdID, dest, cmdNumber, args := kraProtocol.DecodeWebMessage(msg)
|
||||||
|
|
||||||
if status == kraProtocol.StatusReply {
|
if status == kraProtocol.StatusReply {
|
||||||
// TODO: TODO: handling reply - answering message to target dest (ex. GameServer-1)
|
// TODO: TODO: handling reply - answering message to target dest (ex. GameServer-1)
|
||||||
|
|
Loading…
Reference in New Issue