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

Last change on this file 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
Line 
1#ifndef TRANSPORT_PEER_HPP_
2#define TRANSPORT_PEER_HPP_
3
4// ariba
5#include "ariba/config.h"
6#include "ariba/utility/logging/Logging.h"
7#include "ariba/utility/addressing2/endpoint_set.hpp"
8
9// ariba interfaces
10#include "interfaces/transport_protocol.hpp"
11
12// boost
13#include <boost/shared_ptr.hpp>
14
15// boost-adaption
16//#include "rfcomm/bluetooth_rfcomm.hpp"
17
18
19// namespace ariba::transport
20namespace ariba {
21namespace transport {
22
23/**
24 * This class allocates implementations of various transport
25 * protocols and can send messages to an entire set of endpoints
26 *
27 * @author Sebastian Mies <mies@tm.uka.de>, Mario Hock
28 */
29class transport_peer :
30 public transport_protocol
31{
32 use_logging_h(transport_peer);
33 typedef boost::shared_ptr<transport_protocol> TransportProtocolPtr;
34
35public:
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
45 virtual ~transport_peer();
46 virtual void start();
47 virtual void stop();
48
49 virtual void send(
50 const addressing2::const_EndpointSetPtr endpoints,
51 reboost::message_t message,
52 uint8_t priority = system_priority::OVERLAY);
53
54 virtual void register_listener( transport_listener* listener );
55
56
57private:
58 addressing2::EndpointSetPtr local;
59 std::vector<TransportProtocolPtr> transport_streams;
60};
61
62}} // namespace ariba::transport
63
64#endif /* TRANSPORT_PEER_HPP_ */
Note: See TracBrowser for help on using the repository browser.