protected void WebRequestCallback(IAsyncResult result)
        {
            if (Listener == null)
            {
                return;
            }
            HttpListenerContext context = Listener.EndGetContext(result);

            Listener.BeginGetContext(new AsyncCallback(WebRequestCallback), Listener);
            ReceiveWebRequest?.Invoke(context);
            ProcessRequest(context);
        }
Beispiel #2
0
        protected void WebRequestCallback(IAsyncResult result)
        {
            if (Listener == null)
            {
                return;
            }

            // Get out the context object
            HttpListenerContext context = Listener.EndGetContext(result);

            // *** Immediately set up the next context
            Listener.BeginGetContext(new AsyncCallback(WebRequestCallback), Listener);
            ReceiveWebRequest?.Invoke(context);
            ProcessRequest(context);
        }
Beispiel #3
0
        protected void WebRequestCallback(IAsyncResult result)
        {
            Sup.LogTraceInfoMessage("Webserver: WebRequestCallback");

            if (Listener != null)
            {
                HttpListenerContext context = Listener.EndGetContext(result);

                // Immediately set up the next context
                Listener.BeginGetContext(new AsyncCallback(WebRequestCallback), Listener);
                ReceiveWebRequest?.Invoke(context);
                ProcessRequest(context);
            }

            return;
        }
 protected virtual void OnBeginRequest(HttpListenerContext context)
 {
     ReceiveWebRequest?.Invoke(context);
     BeforeRequest?.Invoke(context);
 }