Software /
code /
prosody
Comparison
net/server_event.lua @ 12387:05c250fa335a
Spelling: Fix various spelling mistakes (thanks timeless)
Words, sometimes I wonder how they even work
Maybe I missed something.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 07 Mar 2022 00:13:56 +0100 |
parent | 11741:dcf38ac6a38c |
child | 12480:7e9ebdc75ce4 |
comparison
equal
deleted
inserted
replaced
12386:2d3080d02960 | 12387:05c250fa335a |
---|---|
260 return nointerface, noreading, nowriting | 260 return nointerface, noreading, nowriting |
261 end | 261 end |
262 | 262 |
263 --TODO: Deprecate | 263 --TODO: Deprecate |
264 function interface_mt:lock_read(switch) | 264 function interface_mt:lock_read(switch) |
265 log("warn", ":lock_read is deprecated, use :pasue() and :resume()"); | 265 log("warn", ":lock_read is deprecated, use :pause() and :resume()"); |
266 if switch then | 266 if switch then |
267 return self:pause(); | 267 return self:pause(); |
268 else | 268 else |
269 return self:resume(); | 269 return self:resume(); |
270 end | 270 end |
538 if interface.eventreadtimeout then -- we have to read first | 538 if interface.eventreadtimeout then -- we have to read first |
539 local ret = interface.readcallback( ) -- call readcallback | 539 local ret = interface.readcallback( ) -- call readcallback |
540 --vdebug( "tried to read in writecallback, result:", ret ) | 540 --vdebug( "tried to read in writecallback, result:", ret ) |
541 end | 541 end |
542 if interface.eventwritetimeout then -- luasec only | 542 if interface.eventwritetimeout then -- luasec only |
543 interface.eventwritetimeout:close( ) -- first we have to close timeout event which where regged after a wantread error | 543 interface.eventwritetimeout:close( ) -- first we have to close timeout event which where registered after a wantread error |
544 interface.eventwritetimeout = false | 544 interface.eventwritetimeout = false |
545 end | 545 end |
546 end | 546 end |
547 interface:onpredrain(); | 547 interface:onpredrain(); |
548 interface.writebuffer = { t_concat(interface.writebuffer) } | 548 interface.writebuffer = { t_concat(interface.writebuffer) } |
605 interface:_close() | 605 interface:_close() |
606 interface.eventread = nil | 606 interface.eventread = nil |
607 return -1 -- took too long to get some data from client -> disconnect | 607 return -1 -- took too long to get some data from client -> disconnect |
608 end | 608 end |
609 if interface._usingssl then -- handle luasec | 609 if interface._usingssl then -- handle luasec |
610 if interface.eventwritetimeout then -- ok, in the past writecallback was regged | 610 if interface.eventwritetimeout then -- ok, in the past writecallback was registered |
611 local ret = interface.writecallback( ) -- call it | 611 local ret = interface.writecallback( ) -- call it |
612 --vdebug( "tried to write in readcallback, result:", tostring(ret) ) | 612 --vdebug( "tried to write in readcallback, result:", tostring(ret) ) |
613 end | 613 end |
614 if interface.eventreadtimeout then | 614 if interface.eventreadtimeout then |
615 interface.eventreadtimeout:close( ) | 615 interface.eventreadtimeout:close( ) |