Changeset

885:38ed2db19a55

net.server: Allow replacement of send function on an open socket
author Matthew Wild <mwild1@gmail.com>
date Sat, 07 Mar 2009 19:56:53 +0000
parents 884:5758c39285ab
children 886:96de7f0a41cc
files net/server.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/net/server.lua	Sat Mar 07 19:40:00 2009 +0000
+++ b/net/server.lua	Sat Mar 07 19:56:53 2009 +0000
@@ -386,6 +386,10 @@
         pattern = new or pattern
         return pattern
     end
+    handler.setsend = function ( newsend )
+        send = newsend or send
+        return send
+    end
     handler.bufferlen = function( readlen, sendlen )
         maxsendlen = sendlen or maxsendlen
         maxreadlen = readlen or maxreadlen