Exemple #1
0
 void ISocketClientEventListener.OnConnectionFailed(ITcpConnectionInfo connectionInfo, SocketError socketError)
 {
     if (_eventListener != null)
     {
         _eventListener.OnConnectionFailed(connectionInfo, socketError);
     }
     ReconnectServer();
 }
Exemple #2
0
 private void OnConnectionFailed(ITcpConnection connection, SocketError socketError)
 {
     ConnectionStatus = TcpConnectionStatus.ConnectionFailed;
     _logger.InfoFormat("TCP connection failed: [remoteEndPoint:{0}, localEndPoint:{1}, connectionId:{2:B}, socketError:{3}].", connection.RemoteEndPoint, connection.LocalEndPoint, connection.ConnectionId, socketError);
     if (_eventListener != null)
     {
         _eventListener.OnConnectionFailed(connection, socketError);
     }
 }
Exemple #3
0
 void ISocketClientEventListener.OnConnectionFailed(ITcpConnectionInfo connectionInfo, SocketError socketError)
 {
     if (_eventListener != null)
     {
         _eventListener.OnConnectionFailed(connectionInfo, socketError);
     }
     Thread.Sleep(1000);
     if (_tcpClient.IsStarted && !_tcpClient.IsStopped)
     {
         ReconnectServer();
     }
 }