source: source/ariba/utility/transport/transport_peer.hpp@ 12771

Last change on this file since 12771 was 12060, checked in by hock@…, 11 years ago

Reintegrate branch: 20130111-hock-message_classes

improvements:

  • new message classes (reboost, zero-copy)
  • "fast path" for direct links (skip overlay layer)
  • link-properties accessible from the application
  • SystemQueue can call boost::bind functions
  • protlib compatibility removed (32bit overhead saved in every message)
  • addressing2
  • AddressDiscovery discoveres only addresses on which we're actually listening
  • ariba serialization usage reduced (sill used in OverlayMsg)
  • Node::connect, easier and cleaner interface to start-up ariba from the application
  • ariba configs via JSON, XML, etc (boost::property_tree)
  • keep-alive overhead greatly reduced
  • (relayed) overlay links can actually be closed now
  • lost messages are detected in most cases
  • notification to the application when link is transformed into direct-link
  • overlay routing: send message to second best hop if it would be dropped otherwise
  • SequenceNumbers (only mechanisms, so for: upward compatibility)
  • various small fixes


regressions:

  • bluetooth is not yet working again
  • bootstrap modules deactivated
  • liblog4xx is not working (use cout-logging)

This patch brings great performance and stability improvements at cost of backward compatibility.
Also bluetooth and the bootstrap modules have not been ported to the new interfaces, yet.

File size: 1.5 KB
RevLine 
[5284]1#ifndef TRANSPORT_PEER_HPP_
2#define TRANSPORT_PEER_HPP_
3
[12060]4// ariba
[7464]5#include "ariba/config.h"
[10700]6#include "ariba/utility/logging/Logging.h"
[12060]7#include "ariba/utility/addressing2/endpoint_set.hpp"
8
9// ariba interfaces
10#include "interfaces/transport_protocol.hpp"
11
12// boost
[10653]13#include <boost/shared_ptr.hpp>
[5284]14
[12060]15// boost-adaption
16//#include "rfcomm/bluetooth_rfcomm.hpp"
[10653]17
[12060]18
[5284]19// namespace ariba::transport
20namespace ariba {
21namespace transport {
22
23/**
[12060]24 * This class allocates implementations of various transport
25 * protocols and can send messages to an entire set of endpoints
[5284]26 *
[12060]27 * @author Sebastian Mies <mies@tm.uka.de>, Mario Hock
[5284]28 */
[12060]29class transport_peer :
30 public transport_protocol
31{
[10700]32 use_logging_h(transport_peer);
[12060]33 typedef boost::shared_ptr<transport_protocol> TransportProtocolPtr;
34
[5284]35public:
[12060]36 transport_peer();
37
38 /**
39 * Adds endpoints on which ariba should listen ("server"-sockets)
40 *
41 * @return An endpoint_set holding all active endpoints ariba is listening on.
42 */
43 addressing2::EndpointSetPtr add_listenOn_endpoints(addressing2::EndpointSetPtr endpoints);
44
[5284]45 virtual ~transport_peer();
46 virtual void start();
47 virtual void stop();
[10653]48
49 virtual void send(
[12060]50 const addressing2::const_EndpointSetPtr endpoints,
[10653]51 reboost::message_t message,
[12060]52 uint8_t priority = system_priority::OVERLAY);
53
[5284]54 virtual void register_listener( transport_listener* listener );
55
[12060]56
[5284]57private:
[12060]58 addressing2::EndpointSetPtr local;
59 std::vector<TransportProtocolPtr> transport_streams;
[5284]60};
61
62}} // namespace ariba::transport
63
64#endif /* TRANSPORT_PEER_HPP_ */
Note: See TracBrowser for help on using the repository browser.