Comparison

net/server_select.lua @ 9574:03214e6e3272

net.server_select: Deprecate connection:lock_read() method
author Kim Alvefur <zash@zash.se>
date Sun, 28 Oct 2018 16:49:28 +0100
parent 9499:36e379f058c8
child 9576:913a17d6c449
comparison
equal deleted inserted replaced
9573:57637247356d 9574:03214e6e3272
454 handler.bufferlen = function( self, readlen, sendlen ) 454 handler.bufferlen = function( self, readlen, sendlen )
455 maxsendlen = sendlen or maxsendlen 455 maxsendlen = sendlen or maxsendlen
456 maxreadlen = readlen or maxreadlen 456 maxreadlen = readlen or maxreadlen
457 return bufferlen, maxreadlen, maxsendlen 457 return bufferlen, maxreadlen, maxsendlen
458 end 458 end
459 --TODO: Deprecate
460 handler.lock_read = function (self, switch) 459 handler.lock_read = function (self, switch)
460 out_error( "server.lua, lock_read() is deprecated, use pause() and resume()" )
461 if switch == true then 461 if switch == true then
462 local tmp = _readlistlen 462 local tmp = _readlistlen
463 _readlistlen = removesocket( _readlist, socket, _readlistlen ) 463 _readlistlen = removesocket( _readlist, socket, _readlistlen )
464 _readtimes[ handler ] = nil 464 _readtimes[ handler ] = nil
465 if _readlistlen ~= tmp then 465 if _readlistlen ~= tmp then