ProcessNextCommand() public méthode

public ProcessNextCommand ( ) : void
Résultat void
        private void BeginAcceptTcpClientCallback(IAsyncResult ar)
        {
            try
            {
                var client = listener.EndAcceptTcpClient(ar);
                Interlocked.Increment(ref concurrentConnection);
                // accept additional connections
                listener.BeginAcceptTcpClient(BeginAcceptTcpClientCallback, null);

                var clientConnection = new ClientConnection(client, client.GetStream(), ()=>Interlocked.Decrement(ref concurrentConnection));
                clientConnection.ProcessNextCommand();
            }
            catch (ObjectDisposedException)
            {
            }
        }
Exemple #2
0
        private void BeginAcceptTcpClientCallback(IAsyncResult ar)
        {
            try
            {
                var client = listener.EndAcceptTcpClient(ar);
                Interlocked.Increment(ref concurrentConnection);
                // accept additional connections
                listener.BeginAcceptTcpClient(BeginAcceptTcpClientCallback, null);

                var clientConnection = new ClientConnection(client, client.GetStream(), () => Interlocked.Decrement(ref concurrentConnection));
                clientConnection.ProcessNextCommand();
            }
            catch (ObjectDisposedException)
            {
            }
        }