Example #1
0
        void OnHTTPError(Exception ex)
        {
            var evrgs = new HTTPErrorEventArgs();

            evrgs.Exception = ex;

            if (HTTPError != null)
            {
                HTTPError.Invoke(this, evrgs);
            }
        }
Example #2
0
 public void Start()
 {
     try
     {
         listener.Start();
         HandleClientConnections(listener).ConfigureAwait(false);
     }
     catch (HttpListenerException ex)
     {
         HTTPError?.Invoke(this, new ErrorEventArgs(ex));
     }
 }