diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-11-22 04:42:47 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-11-22 04:42:47 +0000 |
commit | 8f2a8c9c0935ad80f10308838667295cbedcf080 (patch) | |
tree | 34ea04a45fc281a153e3be3990ad055e49968765 /net | |
parent | 8da42f8d71b94aacf7b914bd9c1d1147cb33e041 (diff) | |
download | prosody-8f2a8c9c0935ad80f10308838667295cbedcf080.tar.gz prosody-8f2a8c9c0935ad80f10308838667295cbedcf080.zip |
net.adns: Update for new net.server API (doesn't work with libevent yet)
Diffstat (limited to 'net')
-rw-r--r-- | net/adns.lua | 6 |
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 |