UDP client may receive a packet from the server as a response to a command sent from the client.
A server response will contain the version and command ID that correspond sent to the server as well as the status that indicates how the operation was processed on the server (success or failure).
udp.OnResponse+= OnUdpResponse;privatevoidOnUdpResponse(uint ver,uint cmd,uint status,byte[] payload){ // Consume payload accordingly using uint ver and cmdswitch(ver) {caseMY_CUSTOM_CMD_VER1:HandleCustomCmdVer1(cmd, status, payload);default: // Unknown command version... :(break; }}privatevoidHandleCustomCmdVer1(uint cmd,uint status,byte[] payload){bool success = status ==udp.STATUS_OK;switch(cmd) {caseCMD1:HandleCmd1(payload);break;default: // Unknown command ID... :(break; }}