Rev 1315 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1315 | Rev 1317 | ||
|---|---|---|---|
| Line 12... | Line 12... | ||
| 12 | #include <boost/asio.hpp> |
12 | #include <boost/asio.hpp> |
| 13 | #include <boost/signal.hpp> |
13 | #include <boost/signal.hpp> |
| 14 | #include <boost/make_shared.hpp> |
14 | #include <boost/make_shared.hpp> |
| 15 | #include "log/Logger.h" |
15 | #include "log/Logger.h" |
| 16 | #include "utils/BitBuffer.h" |
16 | #include "utils/BitBuffer.h" |
| 17 | #include " |
17 | #include "thread/Thread.h" |
| 18 | #include "utils/convert.h" |
18 | #include "utils/convert.h" |
| 19 | #include "types.h" |
19 | #include "types.h" |
| 20 | 20 | ||
| 21 | namespace atom { |
21 | namespace atom { |
| 22 | namespace |
22 | namespace net { |
| 23 | 23 | ||
| 24 | using boost::asio::ip::udp; |
24 | using boost::asio::ip::udp; |
| 25 | using namespace utils; |
25 | using namespace utils; |
| 26 | 26 | ||
| 27 | class UdpServer : protected Thread |
27 | class UdpServer : protected thread::Thread |
| 28 | { |
28 | { |
| 29 | typedef boost::signal<void(udp::endpoint & sender, byte_list & bytes)> OnDataSignal; |
29 | typedef boost::signal<void(udp::endpoint & sender, byte_list & bytes)> OnDataSignal; |
| 30 | 30 | ||
| 31 | public: |
31 | public: |
| 32 | typedef boost::shared_ptr<UdpServer> pointer; |
32 | typedef boost::shared_ptr<UdpServer> pointer; |