Beispiel #1
0
        // note: this method will execute on I/O Completion Port thread pool thread.
        private void CreateNewProxyConnection(TcpClient client, Endpoint endpoint)
        {
            var id         = Guid.NewGuid();
            var connection = new TcpProxyConnection(id, client, RemoveClosedProxyConnection, m_tracer);
            var successful = connection.Initialize(endpoint);

            if (!successful)
            {
                DecreaseLoad(endpoint);
                connection.Dispose();
            }
        }
Beispiel #2
0
 private void RemoveClosedProxyConnection(TcpProxyConnection connection, Endpoint endpoint)
 {
     DecreaseLoad(endpoint);
     connection.Dispose();
 }