TcpClient

Examples of using a TCP stream bridge are described in Using The TCP Bridge.

TcpClient objects in C++ are referenced by the following shared pointer typedef:

typedef std::shared_ptr<rogue::interfaces::stream::TcpClient> rogue::interfaces::stream::TcpClientPtr

Alias for using shared pointer as TcpClientPtr.

The class description is shown below:

class TcpClient : public rogue::interfaces::stream::TcpCore

Stream TCP Bridge Client.

This class is a wrapper around TcpCore which operates in client mode.

Public Static Functions

static std::shared_ptr<rogue::interfaces::stream::TcpClient> create(std::string addr, uint16_t port)

Create a TcpClient object and return as a TcpClientPtr.

The creator takes an address and port. The passed server address can either be an IP address or hostname. The stream bridge requires two TCP ports. The passed port is the base number of these two ports. A passed value of 8000 will result in both 8000 and 8001 being used by this bridge.

Exposed to Python as rogue.interfaces.stream.TcpClient

Parameters:
  • addr – Interface address for server, remote server address for client.

  • port – Base port number of use for connection.

Returns:

TcpClient object as a TcpClientPtr