reply to ack msg that we recevied the connection/closed information about the clients
parent
c91a062be3
commit
c7abef9630
|
@ -144,17 +144,11 @@ public class SocketClientMessageListener implements KraSocketClientEventInterfac
|
|||
break;
|
||||
}
|
||||
case 53874: { // test message - ack
|
||||
KraSocketClientProtocolMessage kraSocketClientProtocolMessage = new KraSocketClientProtocolMessage(
|
||||
KraSocketClientProtocolStatus.REPLY.getStatus(),
|
||||
kraProtocolMessage.getCmdID(), KraSocketClientProtocolDest.BACKEND.getStatus(),
|
||||
kraProtocolMessage.getUuid(),
|
||||
(short) 53874, "", null);
|
||||
|
||||
ProxySystem.getInstance().getKraSocketClient().getSocketClient()
|
||||
.SendMessage(kraSocketClientProtocolMessage);
|
||||
|
||||
ProxySystem.getInstance().getKraSocketClientProtocol()
|
||||
.removeMessageFromSendQueue(kraProtocolMessage.getCmdID());
|
||||
ProxySystem.getInstance().getKraSocketClientProtocol().replyThatWeReceivedAckMessage(
|
||||
ProxySystem.getInstance().getKraSocketClient().getSocketClient(),
|
||||
ProxySystem.getInstance().getKraSocketClientProtocol(), kraProtocolMessage.getCmdID(),
|
||||
KraSocketClientProtocolDest.BACKEND.getStatus(), kraProtocolMessage.getUuid(),
|
||||
kraProtocolMessage.getCmdNumber());
|
||||
|
||||
System.out.println(
|
||||
"cmdNumber 53874 answered back to uuid:" + kraProtocolMessage.getUuid()
|
||||
|
@ -167,6 +161,14 @@ public class SocketClientMessageListener implements KraSocketClientEventInterfac
|
|||
case 64247: // mobile connection closed
|
||||
case 22348: { // voice connection closed
|
||||
ProxyServer.getInstance().getScheduler().runAsync(ProxySystem.getInstance(), () -> {
|
||||
// ack msg -> Reply to backend that we received the message
|
||||
ProxySystem.getInstance().getKraSocketClientProtocol()
|
||||
.replyThatWeReceivedAckMessage(
|
||||
ProxySystem.getInstance().getKraSocketClient().getSocketClient(),
|
||||
ProxySystem.getInstance()
|
||||
.getKraSocketClientProtocol(), kraProtocolMessage.getCmdID(),
|
||||
KraSocketClientProtocolDest.BACKEND.getStatus(), kraProtocolMessage.getUuid(),
|
||||
kraProtocolMessage.getCmdNumber());
|
||||
|
||||
ProxiedPlayer proxiedPlayer = ProxySystem.getInstance().getProxy()
|
||||
.getPlayer(kraProtocolMessage.getUuid());
|
||||
|
|
Loading…
Reference in New Issue