Pothos
0.2.1-g9f04573d
The Pothos dataflow programming software suite
|
#include <Server.hpp>
Public Member Functions | |
RemoteServer (void) | |
Make an empty handle. More... | |
RemoteServer (const std::string &uri, const bool closePipes=true) | |
const std::string & | getUri (void) const |
Get the server's bind URI. More... | |
pothos_explicit | operator bool (void) const |
Is this remove server active? More... | |
std::string | getActualPort (void) const |
Get the actual port that the server is running on. More... | |
void | startSyslogForwarding (const std::string &addr, const std::string &source) |
Public Member Functions inherited from Pothos::Util::RefHolder | |
virtual | ~RefHolder (void) |
Virtual destructor for derived classes. More... | |
void | holdRef (const Object &container) |
Store a copy of this object container. More... | |
void | dropRef (const Object &container) |
Drop a copy of this object container. More... | |
Static Public Member Functions | |
static std::string | getLocatorPort (void) |
A remote server is a handle for an executing server process. When all copies of the handle destruct, the server process will be terminated.
Pothos::RemoteServer::RemoteServer | ( | void | ) |
Make an empty handle.
Pothos::RemoteServer::RemoteServer | ( | const std::string & | uri, |
const bool | closePipes = true |
||
) |
Spawn a new process on this machine, that is running a proxy server on the given URI. URI format: tcp://resolvable_hostname:optional_port A host address of 0.0.0.0 will bind the server to all interfaces. An unspecified port means that an available port will be automatically chosen.
uri | a formatted string which tells the server what kind of service to run |
closePipes | true to close stdout/err pipes (keep open for syslog forwarding) |
std::string Pothos::RemoteServer::getActualPort | ( | void | ) | const |
Get the actual port that the server is running on.
|
static |
The locator port is the default port for running and locating a remote server. Servers running on this part are used to establish initial communication. Further communication can continue on arbitrary ports selected by the OS.
const std::string& Pothos::RemoteServer::getUri | ( | void | ) | const |
Get the server's bind URI.
pothos_explicit Pothos::RemoteServer::operator bool | ( | void | ) | const |
Is this remove server active?
void Pothos::RemoteServer::startSyslogForwarding | ( | const std::string & | addr, |
const std::string & | source | ||
) |
Start syslog forwarding to the given address. Spawn threads to read the stdout/err pipes from the server process and forward to a syslog channel. Only use when the server is created with closePipes false.
addr | the log destination in host:port format |
source | the repoted source of the log messages |