// 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(); } }
private void RemoveClosedProxyConnection(TcpProxyConnection connection, Endpoint endpoint) { DecreaseLoad(endpoint); connection.Dispose(); }