Comparison

net/server_select.lua @ 2452:2a51031c9ca3

net.server_select: Add conn:setoption() to set options on the socket
author Matthew Wild <mwild1@gmail.com>
date Tue, 12 Jan 2010 15:15:49 +0000
parent 2424:7d3b071e3b5b
child 2478:7be72eca5666
comparison
equal deleted inserted replaced
2451:d2f747920eaf 2452:2a51031c9ca3
350 handler.receive = function( pattern, prefix ) 350 handler.receive = function( pattern, prefix )
351 return receive( socket, pattern, prefix ) 351 return receive( socket, pattern, prefix )
352 end 352 end
353 handler.shutdown = function( pattern ) 353 handler.shutdown = function( pattern )
354 return shutdown( socket, pattern ) 354 return shutdown( socket, pattern )
355 end
356 handler.setoption = function (self, option, value)
357 return socket:setoption(option, value);
355 end 358 end
356 handler.close = function( self, forced ) 359 handler.close = function( self, forced )
357 if not handler then return true; end 360 if not handler then return true; end
358 _readlistlen = removesocket( _readlist, socket, _readlistlen ) 361 _readlistlen = removesocket( _readlist, socket, _readlistlen )
359 _readtimes[ handler ] = nil 362 _readtimes[ handler ] = nil