Software /
code /
prosody
Comparison
net/server_select.lua @ 2304:26f59e5e5c03
net.server_select: Make bufferlen() method return, of all things, the buffer length
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 03 Dec 2009 14:08:54 +0000 |
parent | 2302:2dc9bbf25447 |
child | 2307:fc7e0962520a |
comparison
equal
deleted
inserted
replaced
2303:ecbd68fc46db | 2304:26f59e5e5c03 |
---|---|
432 return send | 432 return send |
433 end | 433 end |
434 handler.bufferlen = function( self, readlen, sendlen ) | 434 handler.bufferlen = function( self, readlen, sendlen ) |
435 maxsendlen = sendlen or maxsendlen | 435 maxsendlen = sendlen or maxsendlen |
436 maxreadlen = readlen or maxreadlen | 436 maxreadlen = readlen or maxreadlen |
437 return maxreadlen, maxsendlen | 437 return bufferlen, maxreadlen, maxsendlen |
438 end | 438 end |
439 handler.lock = function( self, switch ) | 439 handler.lock = function( self, switch ) |
440 if switch == true then | 440 if switch == true then |
441 handler.write = idfalse | 441 handler.write = idfalse |
442 local tmp = _sendlistlen | 442 local tmp = _sendlistlen |