Changeset

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
parents 54:1a2a3d598254
children 56:014bdb4154e9
files init.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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