Comparison

net/server_event.lua @ 7337:8ec935687bae

server_event: Split long list of assignments into multiple lines for readability
author Kim Alvefur <zash@zash.se>
date Tue, 05 Apr 2016 20:41:50 +0200
parent 7336:0d9ac472e58c
child 7338:f8d37227acd7
child 7339:b5565715fce8
comparison
equal deleted inserted replaced
7336:0d9ac472e58c 7337:8ec935687bae
407 return false, "setoption not implemented"; 407 return false, "setoption not implemented";
408 end 408 end
409 409
410 function interface_mt:setlistener(listener) 410 function interface_mt:setlistener(listener)
411 self:ondetach(); -- Notify listener that it is no longer responsible for this connection 411 self:ondetach(); -- Notify listener that it is no longer responsible for this connection
412 self.onconnect, self.ondisconnect, self.onincoming, self.ontimeout, 412 self.onconnect = listener.onconnect;
413 self.onreadtimeout, self.onstatus, self.ondetach 413 self.ondisconnect = listener.ondisconnect;
414 = listener.onconnect, listener.ondisconnect, listener.onincoming, listener.ontimeout, 414 self.onincoming = listener.onincoming;
415 listener.onreadtimeout, listener.onstatus, listener.ondetach; 415 self.ontimeout = listener.ontimeout;
416 self.onreadtimeout = listener.onreadtimeout;
417 self.onstatus = listener.onstatus;
418 self.ondetach = listener.ondetach;
416 end 419 end
417 420
418 -- Stub handlers 421 -- Stub handlers
419 function interface_mt:onconnect() 422 function interface_mt:onconnect()
420 end 423 end