Software /
code /
prosody
Comparison
net/server_event.lua @ 2708:d9c4ade80ae9
net.server_event: Add lock_read() method to connections
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 25 Feb 2010 02:01:00 +0000 |
parent | 2660:9e5b21b7b2f9 |
child | 2726:1b9179e04233 |
comparison
equal
deleted
inserted
replaced
2706:c2dde8bda3fe | 2708:d9c4ade80ae9 |
---|---|
279 | 279 |
280 function interface_mt:_lock(nointerface, noreading, nowriting) -- lock or unlock this interface or events | 280 function interface_mt:_lock(nointerface, noreading, nowriting) -- lock or unlock this interface or events |
281 self.nointerface, self.noreading, self.nowriting = nointerface, noreading, nowriting | 281 self.nointerface, self.noreading, self.nowriting = nointerface, noreading, nowriting |
282 return nointerface, noreading, nowriting | 282 return nointerface, noreading, nowriting |
283 end | 283 end |
284 | |
285 function interface_mt:lock_read(switch) | |
286 return self:_lock(self.nointerface, switch, self.nowriting); | |
287 end | |
284 | 288 |
285 function interface_mt:counter(c) | 289 function interface_mt:counter(c) |
286 if c then | 290 if c then |
287 self._connections = self._connections + c | 291 self._connections = self._connections + c |
288 end | 292 end |