TcpClient

For conceptual usage, see:

Python binding

This C++ class is also exported into Python as rogue.interfaces.stream.TcpClient.

Python API page: - TcpClient

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

typedef std::shared_ptr<rogue::interfaces::stream::TcpClient> rogue::interfaces::stream::TcpClientPtr
[header]

Shared pointer alias for TcpClient.

The class description is shown below:

class TcpClient : public rogue::interfaces::stream::TcpCore
[header]

Stream TCP bridge client.

Thin wrapper around TcpCore configured for client mode.

Public Functions

TcpClient(std::string addr, uint16_t port)
[header] [impl]

Constructs a TCP stream bridge client.

Creator.

This constructor is a low-level C++ allocation path. Prefer create() when shared ownership or Python exposure is required.

The constructor takes an address and port. The remote server address can be an IP address or hostname. The bridge uses two consecutive TCP ports; port is the base (for example, port=8000 uses 8000 and 8001).

Parameters:
  • addr – Remote server address.

  • port – Base TCP port number.

~TcpClient()
[header] [impl]

Destroys the TCP client.

Destructor.

Public Static Functions

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

Creates a TCP stream bridge client and return as TcpClientPtr.

Class creation.

Parameter semantics are identical to the constructor; see TcpClient() for address and port behavior details. Exposed in Python as rogue.interfaces.stream.TcpClient. This static factory is the preferred construction path when the object is shared across Rogue graph connections or exposed to Python. It returns std::shared_ptr ownership compatible with Rogue pointer typedefs.

Company : SLAC National Accelerator Laboratory

Description: Stream Network Client

This file is part of the rogue software platform. It is subject to the license terms in the LICENSE.txt file found in the top-level directory of this distribution and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part of the rogue software platform, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE.txt file.

Parameters:
  • addr – Remote server address.

  • port – Base TCP port number.

Returns:

Shared pointer to the created client.

static void setup_python()
[header] [impl]

Registers this type with Python bindings.