Comparison

net/adns.lua @ 3326:fb95015bc646

net.dns, net.adns: Update resolver:cancel() API so that a table doesn't need to be created for each cancellation internal to net.dns
author Matthew Wild <mwild1@gmail.com>
date Mon, 05 Jul 2010 12:05:46 +0100
parent 3325:b3117a1da834
child 3956:32ec833c2edf
comparison
equal deleted inserted replaced
3325:b3117a1da834 3326:fb95015bc646
36 end)(dns.peek(qname, qtype, qclass)); 36 end)(dns.peek(qname, qtype, qclass));
37 end 37 end
38 38
39 function cancel(handle, call_handler, reason) 39 function cancel(handle, call_handler, reason)
40 log("warn", "Cancelling DNS lookup for %s", tostring(handle[3])); 40 log("warn", "Cancelling DNS lookup for %s", tostring(handle[3]));
41 dns.cancel(handle, call_handler); 41 dns.cancel(handle[1], handle[2], handle[3], handle[4], call_handler);
42 end 42 end
43 43
44 function new_async_socket(sock, resolver) 44 function new_async_socket(sock, resolver)
45 local peername = "<unknown>"; 45 local peername = "<unknown>";
46 local listener = {}; 46 local listener = {};