$darkmode
vtd::RdbTransceiverTcp Class Reference

#include <rdb_transceiver_tcp.hpp>

Inheritance diagram for vtd::RdbTransceiverTcp:
Collaboration diagram for vtd::RdbTransceiverTcp:

Public Member Functions

bool has () const override
 
std::vector< std::shared_ptr< RDB_MSG_t > > receive () override
 
void send (const RDB_MSG_t *message, size_t size) override
 
void to_json (cloe::Json &j) const override
 
- Public Member Functions inherited from cloe::utility::TcpTransceiver
 TcpTransceiver (const std::string &host, uint16_t port)
 
void tcp_connect (const std::string &host, uint16_t port)
 
bool tcp_is_connected () const
 
bool tcp_is_ok () const
 
void tcp_disconnect ()
 
uint16_t tcp_port () const
 
const std::string & tcp_host () const
 
std::string tcp_endpoint () const
 

Protected Member Functions

std::shared_ptr< RDB_MSG_t > receive_wait ()
 
- Protected Member Functions inherited from cloe::utility::TcpTransceiver
std::streamsize tcp_available_data () const
 
template<typename M >
void tcp_send (M *msg, size_t sz)
 

Friends

void to_json (cloe::Json &j, const RdbTransceiverTcp &t)
 

Additional Inherited Members

- Protected Attributes inherited from cloe::utility::TcpTransceiver
boost::asio::ip::tcp::iostream tcp_stream_
 
bool tcp_connected_ {false}
 
std::string tcp_host_ {}
 
uint16_t tcp_port_ {}
 

Detailed Description

RdbTransceiverTcp implements an RdbTransceiver via TCP.

Member Function Documentation

◆ has()

bool vtd::RdbTransceiverTcp::has ( ) const
inlineoverridevirtual

Returns true when the transceiver has a message that can be received.

That is, if true, then a call to receive() will return a vector that is not empty.

Implements vtd::RdbTransceiver.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ receive()

std::vector<std::shared_ptr<RDB_MSG_t> > vtd::RdbTransceiverTcp::receive ( )
inlineoverridevirtual

Non-blocking function to return all received RDB messages.

Implements vtd::RdbTransceiver.

Here is the call graph for this function:

◆ receive_wait()

std::shared_ptr< RDB_MSG_t > vtd::RdbTransceiverTcp::receive_wait ( )
protected

Synchronous (blocking) method to receive an RDB message.

◆ send()

void vtd::RdbTransceiverTcp::send ( const RDB_MSG_t *  msg,
size_t  size 
)
inlineoverridevirtual

Sends the RDB message with the given size.

Parameters
msgRDB message
sizenumber of bytes

Implements vtd::RdbTransceiver.


The documentation for this class was generated from the following files: