From ff9f5aee4b685b8c705bd39d5768eec75a50c5c2 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 8 Jan 2010 03:48:56 +0000 Subject: UDPPacketSource now opens one socket for each resolved endpoint --- src/packetSource.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/packetSource.h') 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 +#include #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 sockets_; }; #endif -- cgit v1.2.3