Software /
code /
prosody
Comparison
net/server_select.lua @ 7738:0647b821e00a
Merge 0.9->0.10
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 24 Nov 2016 14:18:25 +0100 |
parent | 7526:71ef4a4104d3 |
parent | 7736:5a07fe977002 |
child | 7745:6d6a04628954 |
comparison
equal
deleted
inserted
replaced
7734:6a52415ed68a | 7738:0647b821e00a |
---|---|
419 handler.clientport = function( ) | 419 handler.clientport = function( ) |
420 return clientport | 420 return clientport |
421 end | 421 end |
422 handler.port = handler.clientport -- COMPAT server_event | 422 handler.port = handler.clientport -- COMPAT server_event |
423 local write = function( self, data ) | 423 local write = function( self, data ) |
424 if not handler then return false end | |
424 bufferlen = bufferlen + #data | 425 bufferlen = bufferlen + #data |
425 if bufferlen > maxsendlen then | 426 if bufferlen > maxsendlen then |
426 _closelist[ handler ] = "send buffer exceeded" -- cannot close the client at the moment, have to wait to the end of the cycle | 427 _closelist[ handler ] = "send buffer exceeded" -- cannot close the client at the moment, have to wait to the end of the cycle |
427 handler.write = idfalse -- dont write anymore | 428 handler.write = idfalse -- dont write anymore |
428 return false | 429 return false |