summaryrefslogtreecommitdiff
path: root/src/anytun.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/anytun.cpp')
-rw-r--r--src/anytun.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp
index bd21eb3..1b71f15 100644
--- a/src/anytun.cpp
+++ b/src/anytun.cpp
@@ -213,7 +213,7 @@ void sender(void* p)
try {
param->src.send(encrypted_packet.getBuf(), encrypted_packet.getLength(), conn.remote_end_);
- } catch (std::exception& e) {
+ } catch (std::exception&) {
//TODO: do something here
//cLog.msg(Log::PRIO_ERROR) << "could not send data: " << e.what();
}
@@ -448,13 +448,17 @@ int main(int argc, char* argv[])
HostList connect_to = gOpt.getRemoteSyncHosts();
+
+
if(gOpt.getRemoteAddr() != "")
{
- boost::asio::io_service io_service;
- UDPPacketSource::proto::resolver resolver(io_service);
- UDPPacketSource::proto::resolver::query query(gOpt.getRemoteAddr(), gOpt.getRemotePort());
- UDPPacketSource::proto::endpoint endpoint = *resolver.resolve(query);
- createConnection(endpoint,gOpt.getSeqWindowSize(), gOpt.getMux());
+ gResolver.resolveUdp(gOpt.getRemoteAddr(), gOpt.getRemotePort(),
+ boost::bind(createConnection, _1, gOpt.getSeqWindowSize(), gOpt.getMux()));
+ ///*boost::asio::io_service io_service;
+ //UDPPacketSource::proto::resolver resolver(io_service);
+ //UDPPacketSource::proto::resolver::query query(gOpt.getRemoteAddr(), gOpt.getRemotePort());
+ //UDPPacketSource::proto::endpoint endpoint = *resolver.resolve(query);
+ //createConnection(endpoint,gOpt.getSeqWindowSize(), gOpt.getMux());*/
}
#ifndef NO_ROUTING