TCPTransport » History » Version 2

« Previous - Version 2/8 (diff) - Next » - Current version
S. Wrede, 10/17/2011 09:26 PM


TCP-based Transport

Prerequisites

  1. Check that the socket / TCP transport connector is part of your RSB installation (currently only available in Trunk)
  2. You can do this by calling rsb_version --verbose
  3. Look through the installed connectors and ensure that the socket connector is available as shown in the following console output
sericit:server swrede$ rsb_version --verbose
Version: 0.5.0, build 2871 (DATE 2011-10-17 20:57:29 +0200 (Mon, 17 Oct 2011)), abi 2

Default Configuration
rsb::ParticipantConfig[qosSpec = QualityOfServiceSpec[ordering = 10, reliability = 20], errorStrategy = 0, transports = {Transport[name = socket, converters = {}, options = p{ enabled: "1", server: "1" }], Transport[name = spread, converters = {}, options = p{ enabled: "0" }], Transport[name = inprocess, converters = {}, options = p{ enabled: "0" }]}, eventReceivingStrategy = rsb::ParticipantConfig::EventProcessingStrategy[name = parallel, options = p{  }], eventSendingStrategy = rsb::ParticipantConfig::EventProcessingStrategy[name = direct, options = p{  }], options = p{  }]]

Connectors
ConnectorFactory<rsb::transport::InPullConnector>[
    ConnectorInfo[spread, schemas = {spread}, options = {host, port, enabled}]
]
ConnectorFactory<rsb::transport::InPushConnector>[
    ConnectorInfo[inprocess, schemas = {inprocess}, options = {enabled}]
    ConnectorInfo[socket, schemas = {socket}, options = {host, port, server, enabled}]
    ConnectorInfo[spread, schemas = {spread}, options = {host, port, enabled}]
]
ConnectorFactory<rsb::transport::OutConnector>[
    ConnectorInfo[inprocess, schemas = {inprocess}, options = {enabled}]
    ConnectorInfo[socket, schemas = {socket}, options = {enabled}]
    ConnectorInfo[spread, schemas = {spread}, options = {host, maxfragmentsize, port, enabled}]
]

Converters
Repository<std::string>[
    .*               <-> bytearray       : rsb::converter::ByteArrayConverter[wireType = std::string, wireSchema = .*, dataType = bytearray]
    bool             <-> bool            : rsb::converter::BoolConverter[wireType = std::string, wireSchema = bool, dataType = bool]
    portstatechange  <-> portstatechange : rsb::introspection::IntrospectionConverter[wireType = std::string, wireSchema = portstatechange, dataType = portstatechange]
    uint64           <-> unsigned long long: rsb::converter::Uint64Converter[wireType = std::string, wireSchema = uint64, dataType = unsigned long long]
    utf-8-string     <-> std::string     : rsb::converter::StringConverter[wireType = std::string, wireSchema = utf-8-string, dataType = std::string]
    void             <-> void            : rsb::converter::VoidConverter[wireType = std::string, wireSchema = void, dataType = void]
]

Usage

Warning: This is an experimental connector! (only available in C++)

Processes are configured in server and client modes. Therefore, you currently have to add separate rsb.conf files in the working directory of the separate processes.

The basic client configuration (on a single host) looks as follows:

[transport.socket]
enabled = 1
server = 0 
[transport.inprocess]
enabled = 0
[transport.spread]
enabled = 0

For the server config just change the server line to server = 1.

In order to use this connector for remote communciation, you also have to specify host and if necessary port fields.