Module vibe.http.websockets
Implements WebSocket
support and fallbacks for older browsers.
Example
void handleConn(scope WebSocket sock) { // simple echo server while (sock.connected) { auto msg = sock.receiveText(); sock.send(msg); } } void startServer() { import vibe.http.router; auto router = new URLRouter; router.get("/ws", handleWebSockets(&handleConn)); // Start HTTP server using listenHTTP()... }
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. |
WebSocketException
|
Exception thrown by vibe.http.websockets .
|
Structs
Name | Description |
---|---|
Frame
|
Enums
Name | Description |
---|---|
FrameOpcode
|
Authors
Jan Krüger
Copyright
© 2012-2014 RejectedSoftware e.K.
License
Subject to the terms of the MIT license, as written in the included LICENSE.txt file.