HTTPServerContext

Represents a single HTTP server port.

This class defines the incoming interface, port, and TLS configuration of the public server port. The public server port may differ from the local one if a reverse proxy of some kind is facing the public internet and forwards to this HTTP server.

Multiple virtual hosts can be configured to be served from the same port. Their TLS settings must be compatible and each virtual host must have a

Constructors

this
this(string bind_address, ushort bind_port)
Undocumented in source.

Members

Functions

addVirtualHost
size_t addVirtualHost(HTTPServerSettings settings, HTTPServerRequestDelegate request_handler)

Adds a single virtual host.

removeVirtualHost
bool removeVirtualHost(size_t id)

Removes a previously added virtual host using its ID.

stopListening
void stopListening()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

bindAddress
string bindAddress [@property getter]

The local network interface IP address associated with this listener

bindPort
ushort bindPort [@property getter]

The local port associated with this listener

hasVirtualHosts
bool hasVirtualHosts [@property getter]

Determines if any virtual hosts have been addded

tlsContext
TLSContext tlsContext [@property getter]

Returns the TLS context associated with the listener.

virtualHosts
VirtualHost[] virtualHosts [@property getter]

Make m_virtualhosts visible

Structs

VirtualHost
struct VirtualHost
Undocumented in source.

Meta