vibe.d beta banner
get vibe.d
0.10.1

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

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

NameDescription
protocol The protocol set in the "Upgrade" header of the response. Use an empty string to skip setting this field.
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.