From 126e3621fa91a0b5907adc36f2dffc6c81208dc9 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 25 Nov 2008 02:13:05 +0000 Subject: small type cleanup --- src/packetSource.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/packetSource.cpp') 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 #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); } + -- cgit v1.2.3