Dispose() public method

public Dispose ( ) : void
return void
Example #1
0
        // This disposes (disconnects) a client
        private void DisconnectClient(RemoteClient rc, string message)
        {
            if (message != null)
            {
                General.WriteLogLine("Remote client " + rc + " disconnected with error: " + message);
            }
            else
            {
                General.WriteLogLine("Remote client " + rc + " disconnected.");
            }

            rc.Dispose();
            clients.Remove(rc);
        }
Example #2
0
        // This disposes (disconnects) a client
        private void DisconnectClient(RemoteClient rc, string message)
        {
            if(message != null)
                General.WriteLogLine("Remote client " + rc + " disconnected with error: " + message);
            else
                General.WriteLogLine("Remote client " + rc + " disconnected.");

            rc.Dispose();
            clients.Remove(rc);
        }