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