public void Close(int reason = 0) { _logger?.TraceFormat("Closed From {0}", _remoteEndPoint); if (_state == TcpState.Connected || _state == TcpState.Closing) { _client.Close(); _state = TcpState.Closed; if (Closed != null) Closed(this, reason); } }
public override void Close() { _logger?.Info("Close."); SetState(ChannelStateType.Closed); _tcpConnection?.Close(); }