WebSocketSharp.Net.HttpListener.GetContext C# (CSharp) Method

GetContext() public method

Gets an incoming request information.
This method waits for an incoming request and returns the request information when received the request.
/// /// The does not have any URI prefixes to listen on. /// /// /// -or- /// /// /// The has not been started or is stopped currently. /// /// /// This object has been closed. ///
public GetContext ( ) : HttpListenerContext
return HttpListenerContext
        public HttpListenerContext GetContext()
        {
            // The prefixes are not checked when using the async interface!?
            if (prefixes.Count == 0)
                throw new InvalidOperationException ("Please, call AddPrefix before using this method.");

            ListenerAsyncResult ares = (ListenerAsyncResult) BeginGetContext (null, null);
            ares.InGet = true;
            return EndGetContext (ares);
        }