RSB  0.7.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rsb::transport::socket Namespace Reference

Classes

class  Bus
 Instances of this class provide access to a socket-based bus. More...
class  BusConnection
 Instances of this class implement connections to a socket-based bus. More...
class  BusServer
 Instances of this class provide access to a socket-based bus for local and remote bus clients. More...
class  ConnectorBase
 This class is intended to be used as a base class for connector classes of the socket-based transport. More...
class  Factory
 The singleton instance of this class is responsible for managing bus provider objects. More...
class  InConnector
 Instances of this class receive events from a bus that is accessed via a socket connection. More...
class  InPullConnector
 Instances of this class receive events from a bus that is accessed via a socket connection. More...
class  InPushConnector
 Instances of this class receive events from a bus that is accessed via a socket connection. More...
class  OutConnector
 Instances of this connector class push events into Bus objects which take care of socket-based broadcast and delivery. More...

Typedefs

typedef boost::shared_ptr< BusBusPtr
typedef boost::shared_ptr
< BusConnection
BusConnectionPtr
typedef boost::shared_ptr
< BusServer
BusServerPtr
typedef boost::shared_ptr
< ConnectorBase
ConnectorBasePtr
typedef boost::shared_ptr
< InConnector
InConnectorPtr
typedef boost::shared_ptr
< InPullConnector
InPullConnectorPtr
typedef boost::shared_ptr
< InPushConnector
InPushConnectorPtr

Enumerations

enum  Server { SERVER_NO = 0, SERVER_YES = 1, SERVER_AUTO = 2 }

Functions

EventPtr notificationToEvent (protocol::Notification &notification, bool exposeWireSchema=false)
 Converts notification into an Event.
void eventToNotification (protocol::Notification &notification, const EventPtr &event, const std::string &wireSchema, const std::string &data)
 Converts the Event event into a protocol::Notification, storing the result in notification.
template<typename Ch , typename Tr >
std::basic_istream< Ch, Tr > & operator>> (std::basic_istream< Ch, Tr > &stream, Server &value)
template<typename Ch , typename Tr >
std::basic_ostream< Ch, Tr > & operator<< (std::basic_ostream< Ch, Tr > &stream, const Server &value)

Variables

const string DEFAULT_HOST = "localhost"
const uint16_t DEFAULT_PORT = 55555

Typedef Documentation

Definition at line 124 of file BusConnection.h.

typedef boost::shared_ptr< Bus > rsb::transport::socket::BusPtr

Definition at line 49 of file BusConnection.h.

typedef boost::shared_ptr<BusServer> rsb::transport::socket::BusServerPtr

Definition at line 105 of file BusServer.h.

Definition at line 113 of file ConnectorBase.h.

Definition at line 94 of file InConnector.h.

Definition at line 90 of file InPullConnector.h.

Definition at line 83 of file InPushConnector.h.

Enumeration Type Documentation

Enumerator:
SERVER_NO 
SERVER_YES 
SERVER_AUTO 

Definition at line 40 of file Types.h.

Function Documentation

void rsb::transport::socket::eventToNotification ( protocol::Notification &  notification,
const EventPtr &  event,
const std::string &  wireSchema,
const std::string &  data 
)

Converts the Event event into a protocol::Notification, storing the result in notification.

Parameters
notificationThe protocol::Notification object into which the conversion should be performed.
eventevent The Event object that should be serialized.
wireSchemaThe wire-Schema that should be stored in notification.
dataThe payload that should be stored in notification.

Definition at line 81 of file Serialization.cpp.

Referenced by rsb::transport::socket::BusConnection::sendEvent().

Here is the caller graph for this function:

EventPtr rsb::transport::socket::notificationToEvent ( protocol::Notification &  notification,
bool  exposeWireSchema = false 
)

Converts notification into an Event.

The event payload will be copied from notification into the event unmodified to allow application of arbitrary converters.

Parameters
notificationThe protocol::Notification from which the event should be constructed.
exposeWireSchemaControls whether the wire-schema stored in notification should be exposed in a meta data item of the created event.
Returns
A shared pointer to a newly allocated rsb::Event.

TODO(jmoringe): it may be possible to keep a single event instance here since connectors probably have to copy events

Definition at line 39 of file Serialization.cpp.

References rsb::MetaData::setCreateTime(), rsb::MetaData::setReceiveTime(), rsb::MetaData::setSendTime(), rsb::MetaData::setUserInfo(), and rsb::MetaData::setUserTime().

Referenced by rsb::transport::socket::BusConnection::handleReadBody().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Ch , typename Tr >
std::basic_ostream<Ch, Tr>& rsb::transport::socket::operator<< ( std::basic_ostream< Ch, Tr > &  stream,
const Server &  value 
)

Definition at line 69 of file Types.h.

References SERVER_AUTO, SERVER_NO, and SERVER_YES.

template<typename Ch , typename Tr >
std::basic_istream<Ch, Tr>& rsb::transport::socket::operator>> ( std::basic_istream< Ch, Tr > &  stream,
Server &  value 
)

Definition at line 47 of file Types.h.

References SERVER_AUTO, SERVER_NO, and SERVER_YES.

Variable Documentation

const std::string rsb::transport::socket::DEFAULT_HOST = "localhost"

Definition at line 37 of file Types.cpp.

const boost::uint16_t rsb::transport::socket::DEFAULT_PORT = 55555

Definition at line 39 of file Types.cpp.