Software /
code /
prosody
Comparison
net/adns.lua @ 980:b52d442161f2
net.adns: Flush buffer after sending DNS request
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 11 Apr 2009 16:13:40 +0100 |
parent | 973:b091a1a7273b |
child | 1005:0eed5db7758d |
comparison
equal
deleted
inserted
replaced
979:d0fd49c4339c | 980:b52d442161f2 |
---|---|
32 newconn.handler, newconn._socket = server.wrapclient(sock, "dns", 53, listener); | 32 newconn.handler, newconn._socket = server.wrapclient(sock, "dns", 53, listener); |
33 newconn.handler.settimeout = function () end | 33 newconn.handler.settimeout = function () end |
34 newconn.handler.setsockname = function (_, ...) return sock:setsockname(...); end | 34 newconn.handler.setsockname = function (_, ...) return sock:setsockname(...); end |
35 newconn.handler.setpeername = function (_, ...) local ret = sock:setpeername(...); _.setsend(sock.send); return ret; end | 35 newconn.handler.setpeername = function (_, ...) local ret = sock:setpeername(...); _.setsend(sock.send); return ret; end |
36 newconn.handler.connect = function (_, ...) return sock:connect(...) end | 36 newconn.handler.connect = function (_, ...) return sock:connect(...) end |
37 newconn.handler.send = function (_, data) return _.write(data) end | 37 newconn.handler.send = function (_, data) _.write(data); return _.sendbuffer(); end |
38 return newconn.handler; | 38 return newconn.handler; |
39 end | 39 end |
40 | 40 |
41 dns:socket_wrapper_set(new_async_socket); | 41 dns:socket_wrapper_set(new_async_socket); |
42 | 42 |