Dedicated WebSocket server.
More...
#include <wpinet/WebSocketServer.h>
Dedicated WebSocket server.
◆ WebSocketServer()
wpi::WebSocketServer::WebSocketServer |
( |
uv::Stream & | stream, |
|
|
std::span< const std::string_view > | protocols, |
|
|
ServerOptions | options, |
|
|
const private_init & | ) |
◆ Create() [1/2]
Starts a dedicated WebSocket server on the provided connection.
The connection should be an accepted client stream. This also sets the stream user data to the socket server. A connected event is emitted when the connection is opened.
- Parameters
-
stream | Connection stream |
protocols | Acceptable subprotocols |
options | Handshake options |
◆ Create() [2/2]
Starts a dedicated WebSocket server on the provided connection.
The connection should be an accepted client stream. This also sets the stream user data to the socket server. A connected event is emitted when the connection is opened.
- Parameters
-
stream | Connection stream |
protocols | Acceptable subprotocols |
options | Handshake options |
◆ connected
Connected event.
First parameter is the URL, second is the websocket.
The documentation for this class was generated from the following file: