Comparison

net/server.lua @ 868:9e058e51ecaf

net.server: Don't call shutdown method on socket if it doesn't have one, eg. for UDP
author Matthew Wild <mwild1@gmail.com>
date Wed, 04 Mar 2009 12:44:07 +0000
parent 867:21347a87e185
child 885:38ed2db19a55
comparison
equal deleted inserted replaced
867:21347a87e185 868:9e058e51ecaf
331 end 331 end
332 else 332 else
333 send( socket, table_concat( bufferqueue, "", 1, bufferqueuelen ), 1, bufferlen ) -- forced send 333 send( socket, table_concat( bufferqueue, "", 1, bufferqueuelen ), 1, bufferlen ) -- forced send
334 end 334 end
335 end 335 end
336 shutdown( socket ) 336 _ = shutdown and shutdown( socket )
337 socket:close( ) 337 socket:close( )
338 _sendlistlen = removesocket( _sendlist, socket, _sendlistlen ) 338 _sendlistlen = removesocket( _sendlist, socket, _sendlistlen )
339 _socketlist[ socket ] = nil 339 _socketlist[ socket ] = nil
340 _writetimes[ handler ] = nil 340 _writetimes[ handler ] = nil
341 _closelist[ handler ] = nil 341 _closelist[ handler ] = nil