irccd
3.0.3
|
Complete implementation for basic sockets. More...
#include <stream.hpp>
Public Member Functions | |
template<typename... Args> | |
basic_socket_stream (Args &&... args) | |
auto | get_socket () const noexcept -> const Socket & |
auto | get_socket () noexcept -> Socket & |
void | recv (recv_handler handler) override |
void | send (const nlohmann::json &json, send_handler handler) override |
![]() | |
stream ()=default | |
virtual | ~stream ()=default |
Additional Inherited Members | |
![]() | |
using | recv_handler = std::function< void(std::error_code, nlohmann::json)> |
Read completion handler. More... | |
using | send_handler = std::function< void(std::error_code)> |
Write completion handler. More... | |
Complete implementation for basic sockets.
Socket | Boost.Asio socket (e.g. boost::asio::ip::tcp::socket) |
|
inline |
Construct a socket stream.
args | the arguments to pass to the constructor |
|
inlinenoexcept |
Get the underlying socket.
|
noexcept |
Overloaded function.
|
inlineoverridevirtual |
Default implementation for Boost.Asio sockets.
handler | the handler |
Implements irccd::stream.
|
inlineoverridevirtual |
Default implementation for Boost.Asio sockets.
json | the JSON message |
handler | the handler |
Implements irccd::stream.