Example #1
0
 public void OnAuthenticationTimeout(DoubleClient.State state)
 {
     UnityFixedDispatcher.InvokeNoDelay(() => {
         if (_client != null)
         {
             Stop();
             _onConnected(false, SocketError.Success, 0, true, false);
         }
     });
 }
Example #2
0
 public void OnConnectionLost(DoubleClient.State state)
 {
     if (state == DoubleClient.State.Authenticated)
     {
         UnityFixedDispatcher.InvokeNoDelay(() => {
             if (_client != null)
             {
                 OnDisconnected handler = DisconnectHandler;
                 Stop();
                 handler();
             }
         });
     }
     else
     {
         UnityFixedDispatcher.InvokeNoDelay(() => {
             if (_client != null)
             {
                 Stop();
                 _onConnected(false, SocketError.Success, 0, false, true);
             }
         });
     }
 }
Example #3
0
 public void OnConnectionLost(DoubleClient.State state)
 {
     Dispatcher.InvokeAsync(() => OnDisconnected("Connection lost"));
 }
Example #4
0
 public void OnAuthenticationTimeout(DoubleClient.State state)
 {
     OnFailedToConnect("Authentication timeout: " + state);
 }
Example #5
0
 public void OnConnectionLost(DoubleClient.State state)
 {
     Console.WriteLine($"Client lost connection to server ({state})");
 }
Example #6
0
 public void OnAuthenticationTimeout(DoubleClient.State state)
 {
     PrintAndThrow("TCP authentication timeout: " + state);
 }