void ISocketClientEventListener.OnConnectionClosed(ITcpConnectionInfo connectionInfo, SocketError socketError) { if (_eventListener != null) { _eventListener.OnConnectionClosed(connectionInfo, socketError); } ReconnectServer(); }
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); } }
void ISocketClientEventListener.OnConnectionClosed(ITcpConnectionInfo connectionInfo, SocketError socketError) { if (_eventListener != null) { _eventListener.OnConnectionClosed(connectionInfo, socketError); } if (_tcpClient.IsStarted && !_tcpClient.IsStopped) { ReconnectServer(); } }