Module vibe.http.websockets
Implements WebSocket
support and fallbacks for older browsers.
Examples
void handleConn(WebSocket sock) { // simple echo server while( sock.connected ){ auto msg = sock.receiveText(); sock.send(msg); } } static this { auto router = new URLRouter; router.get("/websocket", handleWebSockets(&handleConn)) // Start HTTP server... }
Functions
Name | Description |
---|---|
handleWebSockets | Returns a HTTP request handler that establishes web socket conections. |
Classes
Name | Description |
---|---|
IncomingWebSocketMessage | Represents a single incoming WebSocket message as an InputStream. |
OutgoingWebSocketMessage | Represents a single outgoing WebSocket message as an OutputStream. |
WebSocket | Represents a single WebSocket connection. |
Structs
Name | Description |
---|---|
Frame |
Enums
Name | Description |
---|---|
FrameOpcode |
Authors
Jan Krüger
Copyright
© 2012 RejectedSoftware e.K.
License
Subject to the terms of the MIT license, as written in the included LICENSE.txt file.