Last change
on this file since 5633 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:
1000 bytes
|
Rev | Line | |
---|
[5284] | 1 | // Internal version: Please do not publish!
|
---|
| 2 | // (... until released under FreeBSD-like license *g*)
|
---|
| 3 | // Code: Sebastian Mies <mies@tm.uka.de>
|
---|
| 4 |
|
---|
| 5 | #ifndef ASIO_IO_SERVICE_H_
|
---|
| 6 | #define ASIO_IO_SERVICE_H_
|
---|
| 7 |
|
---|
| 8 | #include<boost/thread.hpp>
|
---|
| 9 | #include<boost/asio.hpp>
|
---|
| 10 |
|
---|
| 11 | namespace ariba {
|
---|
| 12 | namespace transport {
|
---|
| 13 | namespace detail {
|
---|
| 14 |
|
---|
| 15 | /**
|
---|
| 16 | * TODO: Doc
|
---|
| 17 | *
|
---|
| 18 | * @author Sebastian Mies <mies@tm.uka.de>
|
---|
| 19 | */
|
---|
| 20 | class asio_io_service {
|
---|
| 21 | private:
|
---|
| 22 | int references;
|
---|
| 23 | volatile bool running;
|
---|
| 24 | volatile bool destroy;
|
---|
| 25 | boost::thread* thread;
|
---|
| 26 | boost::asio::io_service* service;
|
---|
| 27 |
|
---|
| 28 | static asio_io_service* singleton;
|
---|
| 29 |
|
---|
| 30 | friend class boost::thread;
|
---|
| 31 | friend class boost::detail::thread_data<boost::reference_wrapper<asio_io_service> >;
|
---|
| 32 |
|
---|
| 33 | protected:
|
---|
| 34 | void operator ()();
|
---|
| 35 | asio_io_service();
|
---|
| 36 | ~asio_io_service();
|
---|
| 37 | void internal_start();
|
---|
| 38 | void internal_stop();
|
---|
| 39 | public:
|
---|
| 40 | static boost::asio::io_service& alloc();
|
---|
| 41 | static void free();
|
---|
| 42 | static void start();
|
---|
| 43 | static void stop();
|
---|
| 44 | };
|
---|
| 45 |
|
---|
| 46 | }}} // namespace ariba::transport::detail
|
---|
| 47 |
|
---|
| 48 | #endif /* ASIO_IO_SERVICE_H_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.