rogue
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rogue::interfaces::ZmqServerWrap Class Reference

Python-overridable wrapper for ZmqServer. More...

#include <ZmqServer.h>

Inheritance diagram for rogue::interfaces::ZmqServerWrap:
rogue::interfaces::ZmqServer

Public Member Functions

 ZmqServerWrap (std::string addr, uint16_t port)
 Constructs wrapper server.
 
boost::python::object doRequest (boost::python::object data)
 Processes a Python-object request message.
 
boost::python::object defDoRequest (boost::python::object data)
 Calls base-class doRequest() implementation.
 
std::string doString (const std::string &data)
 Processes a string request message.
 
std::string defDoString (const std::string &data)
 Calls base-class doString() implementation.
 
- Public Member Functions inherited from rogue::interfaces::ZmqServer
 ZmqServer (const std::string &addr, uint16_t port)
 Constructs a ZeroMQ server.
 
virtual ~ZmqServer ()
 Destroys server and stops worker threads/sockets.
 
void publish (boost::python::object data)
 Publishes an update payload on the publish socket.
 
uint16_t port ()
 Returns currently bound base port.
 
void stop ()
 Stops server threads and closes sockets.
 
void start ()
 Starts server, binds sockets, and launches worker threads.
 

Additional Inherited Members

- Static Public Member Functions inherited from rogue::interfaces::ZmqServer
static std::shared_ptr< rogue::interfaces::ZmqServercreate (const std::string &addr, uint16_t port)
 Creates a ZeroMQ server.
 
static void setup_python ()
 Registers Python bindings for this class.
 

Detailed Description

Python-overridable wrapper for ZmqServer.

Definition at line 153 of file ZmqServer.h.

Constructor & Destructor Documentation

◆ ZmqServerWrap()

rogue::interfaces::ZmqServerWrap::ZmqServerWrap ( std::string  addr,
uint16_t  port 
)

Constructs wrapper server.

Parameters
addrBind address/interface.
portBase port. Use 0 for auto-allocation.

Definition at line 239 of file ZmqServer.cpp.

Member Function Documentation

◆ defDoRequest()

boost::python::object rogue::interfaces::ZmqServerWrap::defDoRequest ( boost::python::object  data)

Calls base-class doRequest() implementation.

Default Boost.Python fallback for _doRequest() when no Python override is provided.

Parameters
dataRequest payload as a Python object.
Returns
Response payload as a Python object.

Definition at line 253 of file ZmqServer.cpp.

◆ defDoString()

std::string rogue::interfaces::ZmqServerWrap::defDoString ( const std::string &  data)

Calls base-class doString() implementation.

Default Boost.Python fallback for _doString() when no Python override is provided.

Parameters
dataRequest string payload.
Returns
Response string payload.

Definition at line 271 of file ZmqServer.cpp.

◆ doRequest()

boost::python::object rogue::interfaces::ZmqServerWrap::doRequest ( boost::python::object  data)
virtual

Processes a Python-object request message.

Invokes the overridden _doRequest() Python method when present. If no override is provided (or override dispatch falls through), the base-class ZmqServer::doRequest() implementation is used.

Parameters
dataRequest payload as a Python object.
Returns
Response payload as a Python object.

Reimplemented from rogue::interfaces::ZmqServer.

Definition at line 242 of file ZmqServer.cpp.

◆ doString()

std::string rogue::interfaces::ZmqServerWrap::doString ( const std::string &  data)
virtual

Processes a string request message.

Invokes the overridden _doString() Python method when present. If no override is provided (or override dispatch falls through), the base-class ZmqServer::doString() implementation is used.

Parameters
dataRequest string payload.
Returns
Response string payload.

Reimplemented from rogue::interfaces::ZmqServer.

Definition at line 257 of file ZmqServer.cpp.


The documentation for this class was generated from the following files: