RSB
0.7.0
|
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. | |
virtual | ~ConnectorBase () |
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. | |
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 . |
Protected Attributes | |
volatile bool | active |
Private Attributes | |
rsc::logging::LoggerPtr | logger |
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 56 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 60 of file ConnectorBase.cpp.
References active, bus, rsb::transport::socket::Factory::getBus(), getBus(), host, logger, port, server, and tcpnodelay.
|
protectedvirtual |
Reimplemented in rsb::transport::socket::InConnector, and rsb::transport::socket::OutConnector.
Definition at line 75 of file ConnectorBase.cpp.
References active, bus, getBus(), and logger.
Referenced by ~ConnectorBase().
|
protected |
Return the Bus object through which this connector is connected to a socket-based bus.
Definition at line 86 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().
|
protected |
Definition at line 93 of file ConnectorBase.h.
Referenced by rsb::spread::InPushConnector::activate(), activate(), rsb::spread::InPushConnector::deactivate(), deactivate(), rsb::transport::socket::InPushConnector::handle(), rsb::transport::socket::InPullConnector::handle(), rsb::spread::InPushConnector::printContents(), rsb::spread::InPushConnector::setScope(), rsb::transport::socket::InConnector::setScope(), ~ConnectorBase(), rsb::transport::socket::InConnector::~InConnector(), and rsb::spread::InPushConnector::~InPushConnector().
|
private |
Definition at line 105 of file ConnectorBase.h.
Referenced by activate(), deactivate(), and getBus().
|
private |
Definition at line 107 of file ConnectorBase.h.
Referenced by activate().
|
private |
Definition at line 103 of file ConnectorBase.h.
Referenced by activate(), and deactivate().
|
private |
Definition at line 108 of file ConnectorBase.h.
Referenced by activate().
|
private |
Definition at line 109 of file ConnectorBase.h.
Referenced by activate().
|
private |
Definition at line 110 of file ConnectorBase.h.
Referenced by activate().