Built in websocket client.
More...
|
| default_socket (std::unique_ptr<::realm::sync::WebSocketInterface > &&) |
|
void | async_write_binary (std::string_view data, websocket_interface::FunctionHandler &&handler) override |
|
virtual | ~websocket_interface ()=default |
|
virtual void | async_write_binary (std::string_view data, FunctionHandler &&handler)=0 |
|
|
using | FunctionHandler = std::function< void(status)> |
|
Built in websocket client.
◆ async_write_binary()
void realm::networking::default_socket::async_write_binary |
( |
std::string_view |
data, |
|
|
websocket_interface::FunctionHandler && |
handler |
|
) |
| |
|
overridevirtual |
Write data asynchronously to the WebSocket connection. The handler function will be called when the data has been sent successfully. The web_socket_oberver provided when the WebSocket was created will be called if any errors occur during the write operation.
- Parameters
-
data | A std::string_view containing the data to be sent to the server. |
handler | The handler function to be called when the data has been sent successfully or the websocket has been closed (with ErrorCodes::OperationAborted). If an error occurs during the write operation, the websocket will be closed and the error will be provided via the websocket_closed_handler() function. |
Implements realm::networking::websocket_interface.
The documentation for this struct was generated from the following file:
- src/cpprealm/networking/websocket.cpp