udp.OnOffline+= OnUdpOffline;udp.OnConnect+= OnUdpConnect;privatevoidOnUdpOffline(){ // We set a flag, so we can perform re-connection in OnDisconnect event listener reconnectFlag =true; // We migrate to another server - This raises OnConnect eventudp.Migrate();}// bool reconnecting is set to true when the client re-establishes a connectionprivatevoidOnUdpConnect(bool reconnecting){if (reconnectFlag) { } // Continue with your live :)}