BeginGetContext() публичный Метод

Begins getting an incoming request information asynchronously.
This asynchronous operation must be completed by calling the EndGetContext method. Typically, the method is invoked by the callback delegate.
/// This object has been closed. /// /// The has not been started or is stopped currently. ///
public BeginGetContext ( AsyncCallback callback, Object state ) : IAsyncResult
callback AsyncCallback /// An delegate that references the method(s) /// called when the asynchronous operation completes. ///
state Object /// An that contains a user defined object to pass to the delegate. ///
Результат IAsyncResult
        // Loop here to begin processing of new requests.
        private void Listen()
        {
            while (IsListening)
            {
                if (_listener == null)
                {
                    return;
                }

                try
                {
                    _listener.BeginGetContext(ListenerCallback, _listener);
                    _listenForNextRequest.WaitOne();
                }
                catch (Exception ex)
                {
                    _logger.Error("Listen()", ex);
                    return;
                }
                if (_listener == null)
                {
                    return;
                }
            }
        }