Function HTTPServerResponse.switchProtocol
Special method sending a SWITCHING_PROTOCOLS response to the client.
ConnectionStream switchProtocol
(
string protocol
) @safe;
void switchProtocol
(
string protocol,
scope @safe void delegate(scope ConnectionStream) del
) @safe;
Notice
For the overload that returns a ConnectionStream
, it must be
ensured that the returned instance doesn't outlive the request
handler callback.
Parameters
Name | Description |
---|---|
protocol | The protocol set in the "Upgrade" header of the response. Use an empty string to skip setting this field. |