Disconnect() public method

public Disconnect ( ) : void
return void
Esempio n. 1
0
        private void RemoveConnection(Connection connection, bool raiseEvent)
        {
            if (connection == null)
                return;
            connection.Disconnect();

            // Remove the connection from the dictionary and raise the OnDisconnection event.
            lock (ConnectionLock)
            {
                if (Connections.Contains(connection))
                    Connections.Remove(connection);
            }

            if (raiseEvent)
                NotifyRemoveConnection(connection);
        }