HttpsServer

HTTPS server. Set SSL parameters on ctx after instantiation.

Constructors

this
this()
Undocumented in source.

Members

Functions

createConnection
IConnection createConnection(TcpConnection tcp)
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

protocol
string protocol [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

ctx
SSLContext ctx;

The SSL context.

Inherited Members

From HttpServer

defaultTimeout
enum defaultTimeout;

The default timeout used for incoming connections.

listen
ushort listen(ushort port, string addr)

Listen on the given TCP address and port. If port is 0, listen on a random available port. Returns the port that the server is actually listening on.

listen
void listen(AddressInfo[] addresses)

Listen on the given addresses.

localAddresses
Address[] localAddresses [@property getter]

Get listen addresses.

close
void close()

Stop listening, and close idle client connections.

log
Logger log;

Optional HTTP request log.

connections
SEDListContainer!HttpServerConnection connections;

Single-ended doubly-linked list of active connections

handleClose
void delegate() handleClose;

Callback for when the socket was closed.

handleRequest
void delegate(HttpRequest request, HttpServerConnection conn) handleRequest;

Callback for an incoming request.

banner
string banner;

What to send in the "X-Powered-By" header.

remoteIPHeader
string remoteIPHeader;

If set, the name of the header which will be used to obtain the actual IP of the connecting peer. Useful when this HttpServer is behind a reverse proxy.

conn
TcpServer conn;
Undocumented in source.
timeout
Duration timeout;
Undocumented in source.
onClose
void onClose()
Undocumented in source. Be warned that the author may not have intended to support it.
createConnection
IConnection createConnection(TcpConnection tcp)
Undocumented in source. Be warned that the author may not have intended to support it.
protocol
string protocol [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
onAccept
void onAccept(TcpConnection incoming)
Undocumented in source. Be warned that the author may not have intended to support it.

Examples

auto s = new HttpsServer();
s.ctx.enableDH(4096);
s.ctx.enableECDH();
s.ctx.setCertificate("server.crt");
s.ctx.setPrivateKey("server.key");

Meta