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;
Undocumented in source.

Inherited Members

From HttpServer

defaultTimeout
enum defaultTimeout;
Undocumented in source.
listen
ushort listen(ushort port, string addr)
Undocumented in source. Be warned that the author may not have intended to support it.
listen
void listen(AddressInfo[] addresses)
Undocumented in source. Be warned that the author may not have intended to support it.
close
void close()
Undocumented in source. Be warned that the author may not have intended to support it.
log
Logger log;
Undocumented in source.
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;
Undocumented in source.
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