HTTPServerSettings.this - multiple declarations
Function HTTPServerSettings.this
Constructs a new settings object with a custom bind interface and/or port.
this
(
string bind_string
) @safe;
The syntax of bind_string
is [<IP address>][:<port>]
, where either of
the two parts can be left off. IPv6 addresses must be enclosed in square
brackets, as they would within a URL.
Throws
An exception is thrown if bind_string
is malformed.
Example
auto s = new HTTPServerSettings(":8080");
assert(s .bindAddresses == ["::", "0.0.0.0"]); // default bind addresses
assert(s .port == 8080);
s = new HTTPServerSettings("123.123.123.123");
assert(s .bindAddresses == ["123.123.123.123"]);
assert(s .port == 80);
s = new HTTPServerSettings("[::1]:443");
assert(s .bindAddresses == ["::1"]);
assert(s .port == 443);
}
Function HTTPServerSettings.this
Constructs a new settings object with default values.
this() @safe;