Pothos  0.4.0-gd11861cd
The Pothos dataflow programming software suite
 All Classes Namespaces Files Functions Variables Typedefs Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
Pothos::RemoteClient Class Reference

#include <Client.hpp>

Inheritance diagram for Pothos::RemoteClient:
Inheritance graph
[legend]

Public Member Functions

 RemoteClient (void)
 Make an empty handle. More...
 
 RemoteClient (const std::string &uri, const long timeoutUs=100000)
 
const std::string & getUri (void) const
 Get the connection's URI. More...
 
 operator bool (void) const
 Is this remote client connected? More...
 
std::iostream & getIoStream (void) const
 
ProxyEnvironment::Sptr makeEnvironment (const std::string &name, const ProxyEnvironmentArgs &args=ProxyEnvironmentArgs())
 
- 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 ProxyEnvironment::Sptr makeEnvironment (std::istream &is, std::ostream &os, const std::string &name, const ProxyEnvironmentArgs &args=ProxyEnvironmentArgs())
 
static ProxyEnvironment::Sptr makeEnvironment (std::iostream &io, const std::string &name, const ProxyEnvironmentArgs &args=ProxyEnvironmentArgs())
 
static std::string lookupIpFromNodeId (const std::string nodeId)
 

Detailed Description

A remote client is a handle for a client socket. The socket can be interacted with through iostream.

Constructor & Destructor Documentation

Pothos::RemoteClient::RemoteClient ( void  )

Make an empty handle.

Pothos::RemoteClient::RemoteClient ( const std::string &  uri,
const long  timeoutUs = 100000 
)

Make a client handle to interact with a remote server. A unspecified port means use the default locator port. URI format: tcp://resolvable_hostname:optional_port

Parameters
uria formatted string which specifies a server
timeoutUsthe timeout to connect in microseconds

Member Function Documentation

std::iostream& Pothos::RemoteClient::getIoStream ( void  ) const

Get the iostream to interact with the client handle. This iostream can be passed to makeEnvironment to create a remote proxy.

const std::string& Pothos::RemoteClient::getUri ( void  ) const

Get the connection's URI.

static std::string Pothos::RemoteClient::lookupIpFromNodeId ( const std::string  nodeId)
static

Lookup an IP address given the node identifier of the remote host.

See Also
Pothos::ProxyEnvironment::getNodeId()
Parameters
nodeIdthe unique ID of a host on the network
Returns
the IP address as a string or empty if lookup fails
ProxyEnvironment::Sptr Pothos::RemoteClient::makeEnvironment ( const std::string &  name,
const ProxyEnvironmentArgs args = ProxyEnvironmentArgs() 
)

Create a proxy environment that is interfaced through this remote client object.

static ProxyEnvironment::Sptr Pothos::RemoteClient::makeEnvironment ( std::istream &  is,
std::ostream &  os,
const std::string &  name,
const ProxyEnvironmentArgs args = ProxyEnvironmentArgs() 
)
static

Create a proxy environment that is interfaced over an iostream. This allows for remote proxies that talk over pipes and sockets.

static ProxyEnvironment::Sptr Pothos::RemoteClient::makeEnvironment ( std::iostream &  io,
const std::string &  name,
const ProxyEnvironmentArgs args = ProxyEnvironmentArgs() 
)
static

Create a proxy environment that is interfaced over an iostream. This allows for remote proxies that talk over pipes and sockets.

Pothos::RemoteClient::operator bool ( void  ) const
explicit

Is this remote client connected?


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