Compare commits

...

2 Commits

Author SHA1 Message Date
Alex eedb04be56 reply handling 2021-12-29 15:05:53 +01:00
Alex a9355a82a9 changed DecodeMessage to DecodeWebMessage 2021-12-29 15:04:55 +01:00
2 changed files with 6 additions and 2 deletions

View File

@ -144,7 +144,11 @@ func EncodeJavaMessage(status int, cmdID int, dest int, playerUuid string, cmdNu
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]
cmdID := data[1]
dest := data[2]

View File

@ -27,7 +27,7 @@ func HandleWebMessage(isVoice bool, conn *websocket.Conn, uuid string, msg []byt
return
}
status, cmdID, dest, cmdNumber, args := kraProtocol.DecodeMessage(msg)
status, cmdID, dest, cmdNumber, args := kraProtocol.DecodeWebMessage(msg)
if status == kraProtocol.StatusReply {
// TODO: TODO: handling reply - answering message to target dest (ex. GameServer-1)