Software /
code /
prosody
Comparison
net/server.lua @ 2765:3cb9df793269
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 | 2764:6f5c30865ddf |
child | 2766:5fe6ea49cf70 |
comparison
equal
deleted
inserted
replaced
2764:6f5c30865ddf | 2765:3cb9df793269 |
---|---|
432 return send | 432 return send |
433 end | 433 end |
434 handler.bufferlen = function( readlen, sendlen ) | 434 handler.bufferlen = function( 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( switch ) | 439 handler.lock = function( 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 |