diff options
author | Christian Pointner <equinox@anytun.org> | 2010-01-08 03:48:56 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2010-01-08 03:48:56 +0000 |
commit | ff9f5aee4b685b8c705bd39d5768eec75a50c5c2 (patch) | |
tree | 7136ee43b71761ac39a7f95473d8c448d0d0266c /src/packetSource.h | |
parent | moved to resolver iterator at onResolve callback functions (diff) |
UDPPacketSource now opens one socket for each resolved endpoint
Diffstat (limited to 'src/packetSource.h')
-rw-r--r-- | src/packetSource.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/packetSource.h b/src/packetSource.h index f388517..ffc14bf 100644 --- a/src/packetSource.h +++ b/src/packetSource.h @@ -34,6 +34,7 @@ #define ANYTUN_packetSource_h_INCLUDED #include <boost/asio.hpp> +#include <list> #include "datatypes.h" #include "threadUtils.hpp" @@ -62,17 +63,18 @@ public: typedef boost::asio::ip::udp proto; UDPPacketSource(std::string localaddr, std::string port); + ~UDPPacketSource(); u_int32_t recv(u_int8_t* buf, u_int32_t len, PacketSourceEndpoint& remote); void send(u_int8_t* buf, u_int32_t len, PacketSourceEndpoint remote); - void onResolve(const PacketSourceResolverIt& it); + void onResolve(PacketSourceResolverIt& it); void onError(const std::runtime_error& e); private: boost::asio::io_service io_service_; - proto::socket sock_; + std::list<proto::socket*> sockets_; }; #endif |