TrotiNet.TcpServer.CloseSocket C# (CSharp) Méthode

CloseSocket() protected méthode

Remove the socket contained in the given state object from the connected array list and hash table, then close the socket
protected CloseSocket ( HttpSocket state ) : void
state HttpSocket
Résultat void
        protected virtual void CloseSocket(HttpSocket state)
        {
            HttpSocket actual_state;
            lock (ConnectedSockets)
            {
                if (!ConnectedSockets.TryGetValue(state.id, out actual_state))
                    return;

                System.Diagnostics.Debug.Assert(actual_state == state);
                ConnectedSockets.Remove(state.id);
            }

            state.CloseSocket();
        }