TcpServer

For conceptual usage, see:

Python binding

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

Python API page: - TcpServer

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

typedef std::shared_ptr<rogue::interfaces::stream::TcpServer> rogue::interfaces::stream::TcpServerPtr
[header]

Alias for using shared pointer as TcpServerPtr.

The class description is shown below:

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

Stream TCP bridge server.

Thin wrapper around TcpCore configured for server mode.

Public Functions

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

Constructs a TCP stream bridge server.

Creator.

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

The address can be an IP address or hostname and selects the local bind interface. A value of "*" binds all interfaces. The bridge uses two consecutive TCP ports; port is the base (for example, port=8000 uses 8000 and 8001).

Parameters:
  • addr – Local bind address.

  • port – Base TCP port number.

~TcpServer()
[header] [impl]

Destroys the TCP server.

Destructor.

Public Static Functions

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

Factory method to create a TCP stream bridge server.

Class creation.

Parameter semantics are identical to the constructor; see TcpServer() for address and port behavior details. Exposed in Python as rogue.interfaces.stream.TcpServer. 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 Server

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 – Interface address for the server.

  • port – Base TCP port number for the bridge.

Returns:

Shared pointer (TcpServerPtr) to the created server.

static void setup_python()
[header] [impl]

Registers this type with Python bindings.