20#ifndef ESI_BACKENDS_RPCCLIENT_H
21#define ESI_BACKENDS_RPCCLIENT_H
38 RpcClient(
const std::string &hostname, uint16_t port);
85 std::unique_ptr<ReadChannelConnection>
90 std::unique_ptr<Impl>
impl;
A logical chunk of data representing serialized data.
Abstract handle for a read channel connection.
virtual void disconnect()=0
virtual ~ReadChannelConnection()=default
A gRPC client for communicating with the cosimulation server.
ChannelDirection
Channel direction as reported by the server.
std::unique_ptr< ReadChannelConnection > connectClientReceiver(const std::string &channelName, ReadCallback callback)
Connect to a client-bound channel and receive messages via callback.
std::vector< uint8_t > getCompressedManifest() const
Get the compressed manifest from the server.
uint32_t getEsiVersion() const
Get the ESI version from the manifest.
void writeToServer(const std::string &channelName, const MessageData &data)
Send a message to a server-bound channel.
bool getChannelDesc(const std::string &channelName, ChannelDesc &desc) const
Get the channel description for a channel name.
RpcClient & operator=(const RpcClient &)=delete
std::function< bool(const MessageData &)> ReadCallback
Callback type for receiving messages from a client-bound channel.
std::vector< ChannelDesc > listChannels() const
List all channels available on the server.
std::unique_ptr< Impl > impl
RpcClient(const RpcClient &)=delete
Description of a channel from the server.