reply handling

master
Alex 2021-12-29 14:56:14 +01:00
parent ab7d97a57a
commit 60ff336abd
1 changed files with 14 additions and 1 deletions

View File

@ -27,6 +27,19 @@ func HandleWebMessage(isVoice bool, conn *websocket.Conn, uuid string, status in
return return
} }
if status == kraProtocol.StatusReply {
// TODO: TODO: handling reply
if isVoice {
if isCmdIDInList(webClient.VoiceCmdIDs, cmdID) {
webClient.RemoveVoiceCmdID(cmdID)
} else {
webClient.RemoveMobileCmdID(cmdID)
}
}
return
}
// ack // ack
if status == kraProtocol.StatusGet { if status == kraProtocol.StatusGet {
var cmdIDInList bool var cmdIDInList bool
@ -62,8 +75,8 @@ func HandleWebMessage(isVoice bool, conn *websocket.Conn, uuid string, status in
} }
return return
} }
// no ack
// no ack
if dest == kraProtocol.DestProxy || dest == kraProtocol.DestPlayersCurrentServer { // forwarding message to java / minecraft if dest == kraProtocol.DestProxy || dest == kraProtocol.DestPlayersCurrentServer { // forwarding message to java / minecraft
err = SendMessageToMinecraftServer(status, dest, uuid, cmdNumber, args) err = SendMessageToMinecraftServer(status, dest, uuid, cmdNumber, args)