summaryrefslogtreecommitdiff
path: root/src/packetSource.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-11-25 02:13:05 +0000
committerChristian Pointner <equinox@anytun.org>2008-11-25 02:13:05 +0000
commit126e3621fa91a0b5907adc36f2dffc6c81208dc9 (patch)
tree4c86c513fbe8e388ce1aabcf6cf18e752f6ffb51 /src/packetSource.cpp
parentfixed readme (diff)
small type cleanup
Diffstat (limited to 'src/packetSource.cpp')
-rw-r--r--src/packetSource.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/packetSource.cpp b/src/packetSource.cpp
index ee8951e..9a35cc3 100644
--- a/src/packetSource.cpp
+++ b/src/packetSource.cpp
@@ -32,24 +32,22 @@
#include <boost/asio.hpp>
#include "datatypes.h"
-
#include "packetSource.h"
-#include "buffer.h"
UDPPacketSource::UDPPacketSource(std::string port) : sock_(io_service_)
{
- boost::asio::ip::udp::resolver resolver(io_service_);
- boost::asio::ip::udp::resolver::query query(port);
- boost::asio::ip::udp::endpoint e = *resolver.resolve(query);
+ proto::resolver resolver(io_service_);
+ proto::resolver::query query(port);
+ proto::endpoint e = *resolver.resolve(query);
sock_.open(e.protocol());
sock_.bind(e);
}
UDPPacketSource::UDPPacketSource(std::string localaddr, std::string port) : sock_(io_service_)
{
- boost::asio::ip::udp::resolver resolver(io_service_);
- boost::asio::ip::udp::resolver::query query(localaddr, port);
- boost::asio::ip::udp::endpoint e = *resolver.resolve(query);
+ proto::resolver resolver(io_service_);
+ proto::resolver::query query(localaddr, port);
+ proto::endpoint e = *resolver.resolve(query);
sock_.open(e.protocol());
sock_.bind(e);
}
@@ -63,3 +61,4 @@ void UDPPacketSource::send(u_int8_t* buf, u_int32_t len, PacketSourceEndpoint re
{
sock_.send_to(boost::asio::buffer(buf, len), remote);
}
+