Software /
code /
prosody
Comparison
net/server.lua @ 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 |
parent | 868:9e058e51ecaf |
child | 962:872f5d85636e |
comparison
equal
deleted
inserted
replaced
884:5758c39285ab | 885:38ed2db19a55 |
---|---|
383 return socket | 383 return socket |
384 end | 384 end |
385 handler.pattern = function( new ) | 385 handler.pattern = function( new ) |
386 pattern = new or pattern | 386 pattern = new or pattern |
387 return pattern | 387 return pattern |
388 end | |
389 handler.setsend = function ( newsend ) | |
390 send = newsend or send | |
391 return send | |
388 end | 392 end |
389 handler.bufferlen = function( readlen, sendlen ) | 393 handler.bufferlen = function( readlen, sendlen ) |
390 maxsendlen = sendlen or maxsendlen | 394 maxsendlen = sendlen or maxsendlen |
391 maxreadlen = readlen or maxreadlen | 395 maxreadlen = readlen or maxreadlen |
392 return maxreadlen, maxsendlen | 396 return maxreadlen, maxsendlen |