Rhino.Queues.Protocol.Receiver.BeginAcceptTcpClientCallback C# (CSharp) Method

BeginAcceptTcpClientCallback() private method

private BeginAcceptTcpClientCallback ( IAsyncResult result ) : void
result IAsyncResult
return void
        private void BeginAcceptTcpClientCallback(IAsyncResult result)
        {
            TcpClient client;
            try
            {
                client = listener.EndAcceptTcpClient(result);
            }
            catch (ObjectDisposedException)
            {
                return;
            }
            catch (Exception ex)
            {
                logger.Warn("Error on EndAcceptTcpClient", ex);
                StartAcceptingTcpClient();
                return;
            }

            logger.DebugFormat("Accepting connection from {0}", client.Client.RemoteEndPoint);
            var enumerator = new AsyncEnumerator(
                "Receiver from " + client.Client.RemoteEndPoint
                );
            enumerator.BeginExecute(ProcessRequest(client, enumerator), ar =>
            {
                try
                {
                    enumerator.EndExecute(ar);
                }
                catch (Exception exception)
                {
                    logger.Warn("Failed to recieve message", exception);
                }
            });

            StartAcceptingTcpClient();
        }