RSB
0.9.6
|
This class is intended to be used as a base class for connector classes of the socket-based transport. More...
#include <ConnectorBase.h>
Public Member Functions | |
ConnectorBase (ConverterSelectionStrategyPtr converters, const std::string &host, unsigned int port, Server server, bool tcpnodelay) | |
Creates a connector for the given combination of host, port and server. More... | |
virtual | ~ConnectorBase () |
virtual Scope | getScope () const |
virtual void | setScope (const Scope &scope) |
Protected Member Functions | |
virtual void | activate () |
virtual void | deactivate () |
BusPtr | getBus () |
Return the Bus object through which this connector is connected to a socket-based bus. More... | |
Protected Member Functions inherited from rsb::transport::ConverterSelectingConnector< std::string > | |
ConverterSelectingConnector (ConverterSelectionStrategyPtr converters) | |
ConverterPtr | getConverter (const std::string &key) const |
Try to find a suitable converter for key . More... | |
Protected Attributes | |
volatile bool | active |
Private Attributes | |
rsc::logging::LoggerPtr | logger |
Scope | scope |
BusPtr | bus |
std::string | host |
unsigned int | port |
Server | server |
bool | tcpnodelay |
Additional Inherited Members | |
Public Types inherited from rsb::transport::ConverterSelectingConnector< std::string > | |
typedef converter::Converter < std::string >::Ptr | ConverterPtr |
typedef converter::ConverterSelectionStrategy < std::string >::Ptr | ConverterSelectionStrategyPtr |
This class is intended to be used as a base class for connector classes of the socket-based transport.
It provides establishing and managing a connection to the bus via an instance of the Bus class.
Definition at line 58 of file ConnectorBase.h.
rsb::transport::socket::ConnectorBase::ConnectorBase | ( | ConverterSelectionStrategyPtr | converters, |
const std::string & | host, | ||
unsigned int | port, | ||
Server | server, | ||
bool | tcpnodelay | ||
) |
Creates a connector for the given combination of host, port and server.
converters | A strategy for converter selection within the newly created connector. |
host | The host of the socket through which the newly created connector will operate. |
port | The port of the socket through which the newly created connector will operate. |
server | Controls whether the newly created connector should create a listening socket and wait for connections (value SERVER_YES), connect to an existing listen socket (value SERVER_NO) or try to automatically determine whether there already is a listening socket and create one only if necessary (value SERVER_AUTO). |
tcpnodelay | Controls whether the TCP_NODELAY socket option should be set for the socket implementing the communication of the newly created connector. Setting this option trades decreased latency for decreased throughput. |
Definition at line 44 of file ConnectorBase.cpp.
|
virtual |
Definition at line 54 of file ConnectorBase.cpp.
References active, and deactivate().
|
protectedvirtual |
Reimplemented in rsb::transport::socket::InConnector, and rsb::transport::socket::OutConnector.
Definition at line 71 of file ConnectorBase.cpp.
References active, bus, rsb::transport::socket::Factory::getBus(), getBus(), host, logger, port, server, and tcpnodelay.
Referenced by rsb::transport::socket::OutConnector::activate(), and rsb::transport::socket::InConnector::activate().
|
protectedvirtual |
Reimplemented in rsb::transport::socket::InConnector, and rsb::transport::socket::OutConnector.
Definition at line 86 of file ConnectorBase.cpp.
References active, bus, getBus(), and logger.
Referenced by rsb::transport::socket::OutConnector::deactivate(), rsb::transport::socket::InConnector::deactivate(), and ~ConnectorBase().
|
protected |
Return the Bus object through which this connector is connected to a socket-based bus.
Definition at line 100 of file ConnectorBase.cpp.
References bus.
Referenced by rsb::transport::socket::InConnector::activate(), activate(), rsb::transport::socket::InConnector::deactivate(), deactivate(), and rsb::transport::socket::OutConnector::handle().
|
virtual |
Definition at line 60 of file ConnectorBase.cpp.
References scope.
Referenced by rsb::transport::socket::InConnector::printContents(), and rsb::transport::socket::Bus::removeSink().
|
virtual |
Reimplemented in rsb::transport::socket::InPullConnector, rsb::transport::socket::InPushConnector, and rsb::transport::socket::OutConnector.
Definition at line 64 of file ConnectorBase.cpp.
Referenced by rsb::transport::socket::OutConnector::setScope(), rsb::transport::socket::InPushConnector::setScope(), and rsb::transport::socket::InPullConnector::setScope().
|
protected |
Definition at line 98 of file ConnectorBase.h.
Referenced by activate(), deactivate(), rsb::transport::socket::InPushConnector::handle(), rsb::transport::socket::InPullConnector::handle(), setScope(), ~ConnectorBase(), and rsb::transport::socket::InConnector::~InConnector().
|
private |
Definition at line 112 of file ConnectorBase.h.
Referenced by activate(), rsb::transport::socket::InConnector::deactivate(), deactivate(), and getBus().
|
private |
Definition at line 114 of file ConnectorBase.h.
Referenced by activate().
|
private |
Definition at line 108 of file ConnectorBase.h.
Referenced by activate(), and deactivate().
|
private |
Definition at line 115 of file ConnectorBase.h.
Referenced by activate().
|
private |
Definition at line 110 of file ConnectorBase.h.
Referenced by getScope(), and setScope().
|
private |
Definition at line 116 of file ConnectorBase.h.
Referenced by activate().
|
private |
Definition at line 117 of file ConnectorBase.h.
Referenced by activate().