Qore HttpServer Module Reference  0.9.11
HttpServer::HttpListener Class Reference

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

Inheritance diagram for HttpServer::HttpListener:

Public Member Methods

deprecated addHandlers (hash< auto > handler_info)
 add handlers to the listener More...
 
 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...
 
 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
 
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

◆ addHandlers()

deprecated HttpServer::HttpListener::addHandlers ( hash< auto >  handler_info)

◆ 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

◆ 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