Comparison

net/server_event.lua @ 4377:705a8f14427b

net.server_event: Don't call listener.onincoming with data=nil when listener.onconnect is missing. onincoming's arguments shall always be non-nil.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 03 Sep 2011 02:42:50 +0500
parent 4111:4716c7645ad2
child 4399:1b4161970842
comparison
equal deleted inserted replaced
4376:99277a1abe58 4377:705a8f14427b
458 = listener.onconnect, listener.ondisconnect, listener.onincoming, listener.ontimeout, listener.onstatus; 458 = listener.onconnect, listener.ondisconnect, listener.onincoming, listener.ontimeout, listener.onstatus;
459 end 459 end
460 460
461 -- Stub handlers 461 -- Stub handlers
462 function interface_mt:onconnect() 462 function interface_mt:onconnect()
463 return self:onincoming(nil);
464 end 463 end
465 function interface_mt:onincoming() 464 function interface_mt:onincoming()
466 end 465 end
467 function interface_mt:ondisconnect() 466 function interface_mt:ondisconnect()
468 end 467 end