Last change
on this file since 5506 was 5284, checked in by mies, 15 years ago |
+ added new transport modules and adapted ariba to them
+ exchange endpoint descriptors an link establishment
+ clean up of base communication
+ link establishment with in the presence of multiple endpoints
+ local discovery for ipv6, ipv4 and bluetooth mac addresses
|
File size:
1.1 KB
|
Line | |
---|
1 | #ifndef TCPIP_HPP_
|
---|
2 | #define TCPIP_HPP_
|
---|
3 |
|
---|
4 | #include "../transport.hpp"
|
---|
5 | #include <pthread.h>
|
---|
6 |
|
---|
7 | // forward declaration
|
---|
8 | namespace protlib {
|
---|
9 | template<class X, class Y>
|
---|
10 | class ThreadStarter;
|
---|
11 | class TPoverTCP;
|
---|
12 | class TPoverTCPParam;
|
---|
13 | }
|
---|
14 |
|
---|
15 | namespace ariba {
|
---|
16 | namespace transport {
|
---|
17 |
|
---|
18 | using namespace protlib;
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * TODO: Doc
|
---|
22 | *
|
---|
23 | * @author Sebastian Mies <mies@tm.uka.de>
|
---|
24 | */
|
---|
25 | class tcpip : public transport_protocol {
|
---|
26 | public:
|
---|
27 | tcpip( uint16_t port );
|
---|
28 | virtual ~tcpip();
|
---|
29 | virtual void start();
|
---|
30 | virtual void stop();
|
---|
31 | virtual void send( const address_v* remote, const uint8_t* data, size_t size );
|
---|
32 | virtual void send( const endpoint_set& endpoints, const uint8_t* data, size_t size );
|
---|
33 | virtual void terminate( const address_v* local, const address_v* remote );
|
---|
34 | virtual void register_listener( transport_listener* listener );
|
---|
35 |
|
---|
36 | private:
|
---|
37 | volatile bool done, running;
|
---|
38 | uint16_t port;
|
---|
39 | pthread_t tpreceivethread;
|
---|
40 | ThreadStarter<TPoverTCP, TPoverTCPParam>* tpthread;
|
---|
41 | static void* receiverThread( void* ptp );
|
---|
42 | transport_listener* listener;
|
---|
43 | };
|
---|
44 |
|
---|
45 | }} // namespace ariba::transport
|
---|
46 |
|
---|
47 | #endif /* TCPIP_HPP_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.