Feature #710

Implement socket-based transport

Added by J. Moringen about 9 years ago. Updated about 9 years ago.

Status:ResolvedStart date:11/10/2011
Priority:NormalDue date:
Assignee:J. Moringen% Done:

100%

Category:C++
Target version:rsb-1.0

Related issues

Blocks Robotics Service Bus - Enhancement #545: Check if pure TCP Connector would improve performance for... Resolved 09/05/2011

Associated revisions

Revision aca85aee
Added by J. Moringen about 9 years ago

Fixed some of the worse issues in the rsc/rsb/transport/socket/
refs #710
  • src/rsb/transport/socket/Bus.{h,cpp}: ignore errors when
    disconnecting connections; refer to ConnectorBase instances via
    plain pointers which is sad, but seems unavoidable; reenabled
    suicide; minor documentation improvements
  • src/rsb/transport/socket/BusConnection.{h,cpp}: added a
    disconnecting flag to suppress spurious error reports; let
    disconnect throw exceptions, as these should be handled elsewhere;
    added BusConnection::performSafeCleanup and use it in destructor and
    error situations; disconnect if the bus pointer goes away; do not
    start receiving events immediately
  • src/rsb/transport/socket/ConnectorBase.cpp: call removeConnector on
    the bus when deactivating
  • src/rsb/transport/socket/Factory.{h,cpp}: add supplied connector
    instance to existing or new bus instances to prevent bus instances
    from committing suicide; added some comments
  • src/rsb/transport/socket/InPushConnector.{h,cpp}: made active data
    member volatile; set active to false when deactivating

Revision ce0e417e
Added by J. Moringen about 9 years ago

Removed weak pointer logic in src/rsb/transport/socket/Factory.cpp
refs #710
  • src/rsb/transport/socket/Factory.cpp: since Bus instances are no
    longer managed using weak pointers, the extra logic for dangling
    weak pointers is no longer required

Revision 1c549e8f
Added by J. Moringen about 9 years ago

Removed of bus servers in src/rsb/transport/socket/Factory.cpp
refs #710
  • src/rsb/transport/socket/Factory.cpp: added removal of bus servers
    which was a stub previously; minor cleanup

Revision 2849be99
Added by J. Moringen about 9 years ago

Support cause vectors in src/rsb/transport/socket/Serialization.cpp
refs #710
Note that this is a short-term hack since the generic serialization
code in the core should be used.
  • src/rsb/transport/socket/Serialization.cpp: added (de)serialization
    of cause vectors

Revision fea36609
Added by J. Moringen about 9 years ago

Support automatic client vs. server config in src/rsb/transport/socket/
refs #710
  • src/rsb/transport/socket/ConnectorBase.{h,cpp}: added Server enum;
    added static constant for default port; changed server config option
    to string with possible values "0", "1" and "auto"; implemented
    "auto" mode by first trying to create a server and falling back to
    creating a client if that fails
  • src/rsb/transport/socket/InPushConnector.{h,cpp}: adapted handling
    of server config option
  • src/rsb/transport/socket/OutConnector.{h,cpp}: likewise

Revision c1c003d8
Added by J. Moringen about 9 years ago

Improved option handling in src/rsb/transport/socket/
refs #710
  • src/CMakeLists.txt: added files
    src/rsb/transport/socket/Types.{h,cpp}
  • src/rsb/transport/socket/Types.{h,cpp}: new files; contain basic
    types and constants used in the implementation of the socket-based
    connector
  • src/rsb/transport/socket/ConnectorBase.{h,cpp}: used constants from
    Types.h; ConnectorBase constructor accept Server enum instead of a
    string
  • src/rsb/transport/socket/InPushConnector.{h,cpp}: similar; translate
    server option from string to enum in static create function
  • src/rsb/transport/socket/OutConnector.{h,cpp}: similar

Revision 3c0b5ae3
Added by J. Moringen about 9 years ago

Added event dispatching in src/rsb/transport/socket/BusServer.{h,cpp}
fixes #710
  • src/rsb/transport/socket/BusConnection.cpp: pass connection object
    to handling bus object
  • src/rsb/transport/socket/Bus.{h,cpp}: accept a connection object in
    handleIncoming to event reflecting an event into the connection that
    delivered it
  • src/rsb/transport/socket/BusServer.{h,cpp}: implemented
    handleIncoming by broadcasting events to all connections except the
    through which the respective event was received

Revision 1c17816d
Added by J. Moringen about 9 years ago

Improved name resolution in src/rsb/transport/socket/Factory.cpp
refs #710
  • src/rsb/transport/socket/Factory.cpp: fixed name resolution to at
    least partially work

History

#1 Updated by J. Moringen about 9 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100

Applied in changeset r3092.

Also available in: Atom PDF