ark::comms::TcpClientStage
Defined in header “ark/comms/stages/tcp_client_stage.hh”.
This stage allows you to connect to a remote TCP socket, and it will publish “packet groups” to the rest of the system. While TCP is normally a stream-oriented protocol, this will essentially consider a packet as a single return from a recv() call.
Methods
-
TcpClientStage(std::string name)
Constructor. -
~TcpClientStage()
Destructor. Implemented privately to handle cleanup. -
void initialize(pipeline::StageInterface & interface)
Initializes the stage, starting threads and creating publishers. -
void start()
Indicates that the system has settled and you should begin any threads or processing. -
void shutdown()
Stops the stage, shutting down threads. -
bool is_bound()
Returns true if we are bound; false otherwise. This is intended to be used for testing. -
NetworkAddress get_bound_address()
Returns the bound address of this socket stage. This is intended for testing, to allow people to send packets to this stage. -
SocketStats statistics()
A function intended for testing; returns the current socket stats.