| Qore HttpServer Module Reference 1.4

Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
HttpServer::HttpListener Class Reference

this class implements the listeners for the HttpServer class More...

Inheritance diagram for HttpServer::HttpListener:
[legend]

## Public Member Functions
| addHandlers (hash< string, hash< HttpHandlerConfigInfo > > handler_info)
| add handlers to the listener
| constructor (HttpServer server, string name, int id, Sequence ss, *hash< HttpListenerOptionInfo > opts)
| creates the object with the given parameters
| reloadCertificate ()
| Reloads the HTTPS certificate from the original location.
| removeHandler (HttpServer::AbstractHttpRequestHandler handler)
| removeHandler (string handler_name)

## Static Public Member Functions
static bool | stopIfNoHandlers (HttpServer::HttpListener listener)
| stop listeners if there are no handlers

## Protected Attributes
bool | get_remote_certs = False
| get remote certificates
int | lock_waiting
| thread waiting on lock
*LoggerInterface | logger
| listener-specific logger; if not present, then the server's logger will be used
bool | ssl_accept_all_certs = True
| accept all certificates
int | ssl_verify_flags = SSL_VERIFY_NONE
| SSL verify flags.
const | SslVerifyMap = ...
| map for converting ssl verify flags to strings

## Detailed Description

this class implements the listeners for the HttpServer class

this class is private; it's not exported in the module API

## Member Function Documentation

## ◆ constructor()

HttpServer::HttpListener::constructor | ( | HttpServer | server,
|  | string | name,
|  | int | id,
|  | Sequence | ss,
|  | *hash< HttpListenerOptionInfo > | opts )

creates the object with the given parameters

Parameters

  server | the HTTP server
  name | the listener name
  id | the listener ID
  ss | the listener connection sequence
  opts | listener options

## ◆ reloadCertificate()

HttpServer::HttpListener::reloadCertificate | ( |  | ) |

Reloads the HTTPS certificate from the original location.

Subsequent connections will use the new certificate definition; the listener must have been started with the location information for the X.509 certificate and private key, or a REFRESH-CERTIFICATE error is raised

Exceptions

  REFRESH-CERTIFICATE-ERROR | not an HTTPS listener or certificate location information not present

Since
  HttpServer 1.1

## ◆ removeHandler() [1/2]

HttpServer::HttpListener::removeHandler | ( | HttpServer::AbstractHttpRequestHandler | handler | ) |

Remove handler from the listener.

Exceptions

  INVALID-HANDLER-ERROR | handler is not present in the listener's handler list

## ◆ removeHandler() [2/2]

HttpServer::HttpListener::removeHandler | ( | string | handler_name | ) |

Remove handler from the listener.

Exceptions

  INVALID-HANDLER-ERROR | handler is not present in the listener's handler list

## ◆ stopIfNoHandlers()

static bool HttpServer::HttpListener::stopIfNoHandlers | ( | HttpServer::HttpListener | listener | ) |
| static

stop listeners if there are no handlers

Parameters

  listener | listener to stop

Returns
  whether listener was stopped