(Lower-level support is available via
func@websocket_client_prepare_handshake and
func@websocket_client_verify_handshake, for handling the client side of the
WebSocket handshake, and func@websocket_server_process_handshake for
handling the server side.)
The WebSocket Protocol
Provides support for the WebSocket protocol.
To connect to a WebSocket server, create a class@Session and call soup.session.Session.websocketConnectAsync. To accept WebSocket connections, create a class@Server and add a handler to it with soup.server.Server.addWebsocketHandler.
(Lower-level support is available via func@websocket_client_prepare_handshake and func@websocket_client_verify_handshake, for handling the client side of the WebSocket handshake, and func@websocket_server_process_handshake for handling the server side.)
#SoupWebsocketConnection handles the details of WebSocket communication. You can use soup.websocket_connection.WebsocketConnection.sendText and soup.websocket_connection.WebsocketConnection.sendBinary to send data, and the signal@WebsocketConnection::message signal to receive data. (#SoupWebsocketConnection currently only supports asynchronous I/O.)