source: source/ariba/utility/transport/tcpip/tcpip.hpp@ 6796

Last change on this file since 6796 was 5993, checked in by Christoph Mayer, 15 years ago

sigcomm release

File size: 1.0 KB
Line 
1#ifndef TCPIP_HPP_
2#define TCPIP_HPP_
3
4#include "ariba/utility/transport/transport.hpp"
5#include <pthread.h>
6
7// forward declaration
8namespace protlib {
9template<class X, class Y>
10class ThreadStarter;
11class TPoverTCP;
12class TPoverTCPParam;
13}
14
15namespace ariba {
16namespace transport {
17
18using namespace protlib;
19
20/**
21 * TODO: Doc
22 *
23 * @author Sebastian Mies <mies@tm.uka.de>
24 */
25class tcpip : public transport_protocol {
26public:
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* remote );
34 virtual void register_listener( transport_listener* listener );
35
36private:
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.