An Overlay-based
Virtual Network Substrate
SpoVNet

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

Last change on this file since 10653 was 10653, checked in by Michael Tänzer, 7 years ago

Merge the ASIO branch back into trunk

File size: 1.5 KB
Line 
1#ifndef TRANSPORT_PEER_HPP_
2#define TRANSPORT_PEER_HPP_
3
4#include "ariba/config.h"
5#include "transport_protocol.hpp"
6#include "ariba/utility/addressing/endpoint_set.hpp"
7#include <boost/shared_ptr.hpp>
8#include "rfcomm/bluetooth_rfcomm.hpp"
9
10
11// namespace ariba::transport
12namespace ariba {
13namespace transport {
14
15using namespace ariba::addressing;
16
17class tcpip;
18
19#ifdef HAVE_LIBBLUETOOTH
20class rfcomm_transport;
21#endif
22
23/**
24 * TODO: Doc
25 *
26 * @author Sebastian Mies <mies@tm.uka.de>
27 */
28/// this transport peer allocates implementations of various transport
29/// protocols and can send messages to an entire set of endpoints
30class transport_peer : public transport_protocol {
31public:
32        transport_peer( endpoint_set& local_set );
33        virtual ~transport_peer();
34        virtual void start();
35        virtual void stop();
36       
37        virtual void send(
38                const endpoint_set& endpoints,
39                reboost::message_t message,
40                uint8_t priority = 0);
41       
42        /// @deprecated: Use terminate() from transport_connection instead
43        virtual void terminate( const address_v* remote );
44       
45        virtual void register_listener( transport_listener* listener );
46
47private:
48        void create_service(tcp::endpoint endp);
49#ifdef HAVE_LIBBLUETOOTH
50        void create_service(boost::asio::bluetooth::rfcomm::endpoint endp);
51#endif
52       
53        endpoint_set&  local;
54        std::vector< boost::shared_ptr<tcpip> > tcps;
55#ifdef HAVE_LIBBLUETOOTH
56        std::vector< boost::shared_ptr<rfcomm_transport> > rfcomms;
57#endif
58};
59
60}} // namespace ariba::transport
61
62#endif /* TRANSPORT_PEER_HPP_ */
Note: See TracBrowser for help on using the repository browser.