JSON-RPC 2.0
JSON-RPC 2.0 Modern C++ Library
Loading...
Searching...
No Matches
framed_pipe_transport.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5#include <asio.hpp>
6
9
11
13 public:
15 asio::any_io_executor executor, const std::string& socket_path,
16 bool is_server, std::shared_ptr<spdlog::logger> logger = nullptr);
17
18 auto SendMessage(std::string message)
19 -> asio::awaitable<std::expected<void, error::RpcError>> override;
20
21 auto ReceiveMessage()
22 -> asio::awaitable<std::expected<std::string, error::RpcError>> override;
23
24 private:
25 std::string read_buffer_;
26 MessageFramer framer_;
27};
28
29} // namespace jsonrpc::transport
auto ReceiveMessage() -> asio::awaitable< std::expected< std::string, error::RpcError > > override
auto SendMessage(std::string message) -> asio::awaitable< std::expected< void, error::RpcError > > override
FramedPipeTransport(asio::any_io_executor executor, const std::string &socket_path, bool is_server, std::shared_ptr< spdlog::logger > logger=nullptr)