void OnHTTPError(Exception ex) { var evrgs = new HTTPErrorEventArgs(); evrgs.Exception = ex; if (HTTPError != null) { HTTPError.Invoke(this, evrgs); } }
public void Start() { try { listener.Start(); HandleClientConnections(listener).ConfigureAwait(false); } catch (HttpListenerException ex) { HTTPError?.Invoke(this, new ErrorEventArgs(ex)); } }