summaryrefslogtreecommitdiff
path: root/src/packetSource.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2010-01-08 03:48:56 +0000
committerChristian Pointner <equinox@anytun.org>2010-01-08 03:48:56 +0000
commitff9f5aee4b685b8c705bd39d5768eec75a50c5c2 (patch)
tree7136ee43b71761ac39a7f95473d8c448d0d0266c /src/packetSource.h
parentmoved 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.h6
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