Comparison

net/server_select.lua @ 6314:8029b8a5f37a

net.server_select/event: Switch sender mode to *a when reading, to make sure we get all available data
author Matthew Wild <mwild1@gmail.com>
date Fri, 25 Jul 2014 13:53:39 +0100
parent 6047:4db0403bfc0d
child 6315:7a3e2f2d43fc
child 6379:a280bd6ccce2
comparison
equal deleted inserted replaced
6311:f44876548487 6314:8029b8a5f37a
703 if not sender_locked and receiver.bufferlen() >= buffersize then 703 if not sender_locked and receiver.bufferlen() >= buffersize then
704 sender_locked = true; 704 sender_locked = true;
705 sender:lock_read(true); 705 sender:lock_read(true);
706 end 706 end
707 end 707 end
708 sender:set_mode("*a");
708 end 709 end
709 710
710 ----------------------------------// PUBLIC //-- 711 ----------------------------------// PUBLIC //--
711 712
712 addserver = function( addr, port, listeners, pattern, sslctx ) -- this function provides a way for other scripts to reg a server 713 addserver = function( addr, port, listeners, pattern, sslctx ) -- this function provides a way for other scripts to reg a server