|
oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
|
Non-owning handle to an active WebSocket connection. More...
#include <net_httpd.hpp>
Public Member Functions | |
| Connection (ove_httpd_ws_conn_t *raw) | |
Wraps an opaque ove_httpd_ws_conn_t * from the handler callback. | |
| Result< void > | send (const void *data, size_t len) noexcept |
| Send a text message to this connection. | |
| Result< void > | send (std::string_view sv) noexcept |
| Send a string_view as a text message. | |
| ove_httpd_ws_conn_t * | raw () const |
Returns the underlying ove_httpd_ws_conn_t * (for C-API escape hatches). | |
Non-owning handle to an active WebSocket connection.
Valid only while the connection is active. Wraps the opaque ove_httpd_ws_conn_t pointer.
|
inlinenoexcept |
Send a text message to this connection.
| [in] | data | Message payload. |
| [in] | len | Payload length in bytes. |
Result<void> on success; unexpected Error on failure.
|
inlinenoexcept |
Send a string_view as a text message.
| [in] | sv | String view to send. |