call peer.disconnect right after peer.opcustom
Options
Aevin
✭
what is the best way to send player a message and then disconnect them right the way? do I need to create a timer to wait for a few seconds to make sure the message is sent or engine will execute in order ?
eg:
peer.opcustom("message"); // is this 100% going to happen ?
peer.disconnect(); // at client side, is this 100% going to happen after receive the message ?
eg:
peer.opcustom("message"); // is this 100% going to happen ?
peer.disconnect(); // at client side, is this 100% going to happen after receive the message ?
0
Comments
-
Hi @Aevin,
you can callSendOutgoingCommands();
on the LoadBalancingPeer after using OpCustom. This will send pending events.0 -
@Christian_Simon sorry my bad. i used wrong function, (SendOperationResponse, not opcustom)
here is what i would like to know:
at server side, i would like to disconnect a client after a message is sent.
so this is what i did:
peer.SendOperationResponse(message);
peer.disconnect();
with these 2 lines of server side code, i would like to know what is going to happen at client side ?
1: am i going to receive this message at 100% chance ?
2: disconnect is going to happen after receive message ?0 -