Software /
code /
prosody
Comparison
net/server_event.lua @ 2239:c050074d453a
net.server_event: tostring() some debug logging parameters
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 26 Nov 2009 22:23:51 +0000 |
parent | 2238:0a6375e9b2e2 |
child | 2240:373e3fd8b862 |
comparison
equal
deleted
inserted
replaced
2238:0a6375e9b2e2 | 2239:c050074d453a |
---|---|
536 end | 536 end |
537 end | 537 end |
538 end | 538 end |
539 | 539 |
540 interface.readcallback = function( event ) -- called on read events | 540 interface.readcallback = function( event ) -- called on read events |
541 --vdebug( "new client read event, id/ip/port:", interface, ip, port ) | 541 --vdebug( "new client read event, id/ip/port:", tostring(interface.id), tostring(ip), tostring(port) ) |
542 if interface.noreading or interface.fatalerror then -- leave this event | 542 if interface.noreading or interface.fatalerror then -- leave this event |
543 --vdebug( "leaving this event because:", interface.noreading or interface.fatalerror ) | 543 --vdebug( "leaving this event because:", tostring(interface.noreading or interface.fatalerror) ) |
544 interface.eventread = nil | 544 interface.eventread = nil |
545 return -1 | 545 return -1 |
546 end | 546 end |
547 if EV_TIMEOUT == event then -- took too long to get some data from client -> disconnect | 547 if EV_TIMEOUT == event then -- took too long to get some data from client -> disconnect |
548 interface.fatalerror = "timeout during receiving" | 548 interface.fatalerror = "timeout during receiving" |
552 return -1 | 552 return -1 |
553 else -- can read | 553 else -- can read |
554 if interface._usingssl then -- handle luasec | 554 if interface._usingssl then -- handle luasec |
555 if interface.eventwritetimeout then -- ok, in the past writecallback was regged | 555 if interface.eventwritetimeout then -- ok, in the past writecallback was regged |
556 local ret = interface.writecallback( ) -- call it | 556 local ret = interface.writecallback( ) -- call it |
557 --vdebug( "tried to write in readcallback, result:", ret ) | 557 --vdebug( "tried to write in readcallback, result:", tostring(ret) ) |
558 end | 558 end |
559 if interface.eventreadtimeout then | 559 if interface.eventreadtimeout then |
560 interface.eventreadtimeout:close( ) | 560 interface.eventreadtimeout:close( ) |
561 interface.eventreadtimeout = nil | 561 interface.eventreadtimeout = nil |
562 end | 562 end |