WebSocket stream with TLS support.
More...
#include <websocket_stream.hpp>
|
| | websocket_stream (const std::shared_ptr< boost::asio::io_context > &io_context) |
| | Constructs a WebSocket stream.
|
| |
| auto | async_connect (websocket_connection_params params, std::function< void(const boost::system::error_code &, std::size_t)> handler) -> void |
| | Asynchronously connects to a WebSocket endpoint.
|
| |
| auto | async_write (std::span< const std::byte > data, std::function< void(const boost::system::error_code &, std::size_t)> handler) -> void |
| | Asynchronously writes data to the WebSocket.
|
| |
| auto | async_read (const boost::asio::mutable_buffer &buffer, std::function< void(const boost::system::error_code &, std::size_t)> handler) -> void |
| | Asynchronously reads data from the WebSocket.
|
| |
| auto | async_close (std::function< void(const boost::system::error_code &, std::size_t)> handler) -> void |
| | Asynchronously closes the WebSocket connection.
|
| |
WebSocket stream with TLS support.
Provides asynchronous operations for secure WebSocket connections using Boost.Beast.
Definition at line 32 of file websocket_stream.hpp.
◆ websocket_stream()
| radix_relay::transport::websocket_stream::websocket_stream |
( |
const std::shared_ptr< boost::asio::io_context > & |
io_context | ) |
|
|
explicit |
Constructs a WebSocket stream.
- Parameters
-
| io_context | Boost.Asio io_context for async operations |
◆ async_close()
| auto radix_relay::transport::websocket_stream::async_close |
( |
std::function< void(const boost::system::error_code &, std::size_t)> |
handler | ) |
-> void |
Asynchronously closes the WebSocket connection.
- Parameters
-
| handler | Completion handler called with error code and bytes transferred |
◆ async_connect()
| auto radix_relay::transport::websocket_stream::async_connect |
( |
websocket_connection_params |
params, |
|
|
std::function< void(const boost::system::error_code &, std::size_t)> |
handler |
|
) |
| -> void |
Asynchronously connects to a WebSocket endpoint.
- Parameters
-
| params | Connection parameters (host, port, path) |
| handler | Completion handler called with error code and bytes transferred |
◆ async_read()
| auto radix_relay::transport::websocket_stream::async_read |
( |
const boost::asio::mutable_buffer & |
buffer, |
|
|
std::function< void(const boost::system::error_code &, std::size_t)> |
handler |
|
) |
| -> void |
Asynchronously reads data from the WebSocket.
- Parameters
-
| buffer | Buffer to store received data |
| handler | Completion handler called with error code and bytes transferred |
◆ async_write()
| auto radix_relay::transport::websocket_stream::async_write |
( |
std::span< const std::byte > |
data, |
|
|
std::function< void(const boost::system::error_code &, std::size_t)> |
handler |
|
) |
| -> void |
Asynchronously writes data to the WebSocket.
- Parameters
-
| data | Data bytes to write |
| handler | Completion handler called with error code and bytes transferred |
The documentation for this class was generated from the following file: