25 SocketTransport(
const std::string &host, uint16_t port,
bool is_server);
35 void SendMessage(
const std::string &message)
override;
39 auto GetSocket() -> asio::ip::tcp::socket &;
45 asio::io_context io_context_;
46 asio::ip::tcp::socket socket_;
Transport implementation using TCP/IP sockets.
SocketTransport(const SocketTransport &)=delete
~SocketTransport() override
auto GetSocket() -> asio::ip::tcp::socket &
void SendMessage(const std::string &message) override
Sends a message in string to the transport layer.
SocketTransport(const std::string &host, uint16_t port, bool is_server)
Constructs a SocketTransport.
SocketTransport(SocketTransport &&)=delete
auto ReceiveMessage() -> std::string override
Receives a message from the transport layer.
auto operator=(const SocketTransport &) -> SocketTransport &=delete
auto operator=(SocketTransport &&) -> SocketTransport &=delete
Base class for JSON-RPC transport.