aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-03-07 19:56:53 +0000
committerMatthew Wild <mwild1@gmail.com>2009-03-07 19:56:53 +0000
commita40ad27d1e7ffccd986487ddb02e6d685a628a17 (patch)
tree4f6207a1c2fa7f408fd6cba797730ee198db2898
parentb657bdb211b25227ea37c9db458ec960b060c0d9 (diff)
downloadprosody-a40ad27d1e7ffccd986487ddb02e6d685a628a17.tar.gz
prosody-a40ad27d1e7ffccd986487ddb02e6d685a628a17.zip
net.server: Allow replacement of send function on an open socket
-rw-r--r--net/server.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/server.lua b/net/server.lua
index 361c5949..891d32db 100644
--- a/net/server.lua
+++ b/net/server.lua
@@ -386,6 +386,10 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport
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