DestroyConnection() public method

public DestroyConnection ( ClientConnection connection, Exception cause ) : void
connection ClientConnection
cause System.Exception
return void
コード例 #1
0
        private void HandleSocketException(Exception e)
        {
            var se = e as SocketException;

            if (se != null)
            {
                Logger.Warning(string.Format("Got socket error: {0}", se.SocketErrorCode));
            }
            else
            {
                Logger.Warning(e.Message, e);
            }
            _clientConnectionManager.DestroyConnection(this);
        }
コード例 #2
0
        private void HandleSocketException(Exception e)
        {
            if (!Live)
            {
                // connection is already closed
                return;
            }

            var se = e as SocketException;

            if (se != null)
            {
                Logger.Warning(string.Format("Got socket error: {0}", se.SocketErrorCode));
            }
            else
            {
                Logger.Warning("Got exception in connection " + this + ":", e);
            }
            _clientConnectionManager.DestroyConnection(this, e);
        }