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 More...
| removeHandler (string handler_name)
| removeHandler (HttpServer::AbstractHttpRequestHandler handler)

## Static Public Member Functions

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

## Protected Attributes

bool | get_remote_certs = False
| get remote certificates
*Logger | 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

## removeHandler() [1/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

## removeHandler() [2/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

## 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