TcpServer

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

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

typedef std::shared_ptr<rogue::interfaces::stream::TcpServer> rogue::interfaces::stream::TcpServerPtr

Alias for using shared pointer as TcpServerPtr.

The class description is shown below:

class TcpServer : public rogue::interfaces::stream::TcpCore

Stream TCP Bridge Server.

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

Public Static Functions

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

Create a TcpServer object and return as a TcpServerPtr.

The creator takes an address and port. The passed address can either be an IP address or hostname. The address string defines which network interface the socket server will listen on. A string of “*” results in all network interfaces being listened on. 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.TcpServer

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

  • port – Base port number of use for connection.

Returns:

TcpServer object as a TcpServerPtr