aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_event.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-05-05 15:24:24 +0100
committerMatthew Wild <mwild1@gmail.com>2010-05-05 15:24:24 +0100
commit3c7eb58b08e7f416d73f86061706674d37f83c4f (patch)
treefbd2c8cecb1944a0c773220c1eb52ab40fa35046 /net/server_event.lua
parent242d67b43e37e5fa4a831011f70a2429957f7b6b (diff)
downloadprosody-3c7eb58b08e7f416d73f86061706674d37f83c4f.tar.gz
prosody-3c7eb58b08e7f416d73f86061706674d37f83c4f.zip
net.server_select, net.server_event: Support for ondrain listener callback for when send buffer is empty
Diffstat (limited to 'net/server_event.lua')
-rw-r--r--net/server_event.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/server_event.lua b/net/server_event.lua
index bbc9a527..8eaa96da 100644
--- a/net/server_event.lua
+++ b/net/server_event.lua
@@ -465,6 +465,8 @@ do
end
function interface_mt:ontimeout()
end
+ function interface_mt:ondrain()
+ end
function interface_mt:onstatus()
debug("server.lua: Dummy onstatus()")
end
@@ -545,6 +547,7 @@ do
if succ then -- writing succesful
interface.writebuffer = ""
interface.writebufferlen = 0
+ interface:ondrain();
if interface.fatalerror then
debug "closing client after writing"
interface:_close() -- close interface if needed