vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

Class HTTPServerContext

Represents a single HTTP server port.

class HTTPServerContext ;

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 unique name.

Constructors

NameDescription
this (bind_address, bind_port)

Properties

NameTypeDescription
bindAddress[get] stringThe local network interface IP address associated with this listener
bindPort[get] ushortThe local port associated with this listener
hasVirtualHosts[get] boolDetermines if any virtual hosts have been addded
tlsContext[get] TLSContextReturns the TLS context associated with the listener.

Methods

NameDescription
addVirtualHost (settings, request_handler) Adds a single virtual host.
removeVirtualHost (id) Removes a previously added virtual host using its ID.
Authors

Sönke Ludwig, Jan Krüger, Ilya Shipunov

Copyright

© 2012-2017 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.