Server

An object which receives HTTP requests through one or more channels and sends replies according to a user-supplied handler.

Constructors

this
this(ServerConfig[string] config)

Constructor.

Members

Functions

runImplicitServer
bool runImplicitServer()

If the current process is being run in a certain environment that implies a particular way of handling requests, run an appropriate server until termination and return true. Otherwise, return false.

startServer
void startServer(string serverName)

Start only the server with the specified name. Does not start an event loop, and returns immediately.

startServers
void startServers()

Start all configured servers, and runs an event loop. Shutdown handlers will be registered, so calling ae.net.shutdown.shutdown will stop all servers.

Mixins

__anonymous
mixin ae.net.ssl.openssl.SSLUseLib
Undocumented in source.

Variables

banner
string banner;

Send this as the X-Powered-By header.

config
ServerConfig[string] config;

Configuration (as specified when constructing).

handleRequest
void delegate(HttpRequest request, immutable ref ServerConfig serverConfig, void delegate(HttpResponse) handleResponse, ref Logger log) handleRequest;

The use-specified request handler.

Parameters

useSSL

Whether to compile SSL support (using ae.net.ssl).

Meta