Qore HttpServer Module Reference 1.1.2
Loading...
Searching...
No Matches
HttpServer::HttpListener Class Reference

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

#include <HttpServer.qm.dox.h>

Inheritance diagram for HttpServer::HttpListener:
[legend]

Public Member Methods

 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 More...
 
 reloadCertificate ()
 Reloads the HTTPS certificate from the original location. More...
 
 removeHandler (HttpServer::AbstractHttpRequestHandler handler)
 
 removeHandler (string handler_name)
 

Static Public Member Methods

static bool stopIfNoHandlers (HttpServer::HttpListener listener)
 stop listeners if there are no handlers More...
 

Private Attributes

bool get_remote_certs = False
 get remote certificates
 
*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
serverthe HTTP server
namethe listener name
idthe listener ID
ssthe listener connection sequence
optslistener 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-ERRORnot 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-ERRORhandler 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-ERRORhandler 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
listenerlistener to stop
Returns
whether listener was stopped