Diff

init.lua @ 55:163beb198646

verse: Add "drained" event to signal when send buffer is empty (new server.lua feature)
author Matthew Wild <mwild1@gmail.com>
date Thu, 06 May 2010 10:28:13 +0100
parent 54:1a2a3d598254
child 59:829a0a495dd1
line wrap: on
line diff
--- a/init.lua	Thu May 06 10:27:11 2010 +0100
+++ b/init.lua	Thu May 06 10:28:13 2010 +0100
@@ -143,6 +143,10 @@
 		stream.connected = false;
 		stream:event("disconnected", { reason = err });
 	end
+
+	function conn_listener.ondrain(conn)
+		stream:event("drained");
+	end
 	
 	return conn_listener;
 end