aboutsummaryrefslogtreecommitdiffstats
path: root/net/adns.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-11-22 04:42:47 +0000
committerMatthew Wild <mwild1@gmail.com>2009-11-22 04:42:47 +0000
commit8f2a8c9c0935ad80f10308838667295cbedcf080 (patch)
tree34ea04a45fc281a153e3be3990ad055e49968765 /net/adns.lua
parent8da42f8d71b94aacf7b914bd9c1d1147cb33e041 (diff)
downloadprosody-8f2a8c9c0935ad80f10308838667295cbedcf080.tar.gz
prosody-8f2a8c9c0935ad80f10308838667295cbedcf080.zip
net.adns: Update for new net.server API (doesn't work with libevent yet)
Diffstat (limited to 'net/adns.lua')
-rw-r--r--net/adns.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/adns.lua b/net/adns.lua
index b0c9a625..c9cb9476 100644
--- a/net/adns.lua
+++ b/net/adns.lua
@@ -45,10 +45,10 @@ end
function new_async_socket(sock, resolver)
local newconn, peername = {}, "<unknown>";
local listener = {};
- function listener.incoming(conn, data)
+ function listener.onincoming(conn, data)
dns.feed(sock, data);
end
- function listener.disconnect(conn, err)
+ function listener.ondisconnect(conn, err)
log("warn", "DNS socket for %s disconnected: %s", peername, err);
local servers = resolver.server;
if resolver.socketset[newconn.handler] == resolver.best_server and resolver.best_server == #servers then
@@ -68,7 +68,7 @@ function new_async_socket(sock, resolver)
newconn.handler.setsockname = function (_, ...) return sock:setsockname(...); end
newconn.handler.setpeername = function (_, ...) peername = (...); local ret = sock:setpeername(...); _.setsend(sock.send); return ret; end
newconn.handler.connect = function (_, ...) return sock:connect(...) end
- newconn.handler.send = function (_, data) _.write(data); return _.sendbuffer(); end
+ newconn.handler.send = function (_, data) _.write(_, data); return _.sendbuffer(); end
return newconn.handler;
end