def _removeClient(self, uid): if uid in self._removing: self.debug("client is removed; firing deferred") removeD = self._removing.pop(uid) removeD.callback(None) HTTPStreamingResource._removeClient(self, uid) self.log("session %s expired", uid) self.streamer.clientRemoved()
def __init__(self, streamer, httpauth, secretKey, sessionTimeout): """ @param streamer: L{FragmentedStreamer} """ HTTPStreamingResource.__init__(self, streamer, httpauth) self.secretKey = secretKey self.sessionTimeout = sessionTimeout self.bytesSent = 0 self.bytesReceived = 0
def render(self, request): self.debug('Incoming client connection from %s: %s', request.getClientIP(), request) request.notifyFinish().addCallback(self._logRequest, request) return HTTPStreamingResource.render(self, request)
def _addClient(self, id): HTTPStreamingResource._addClient(self, id) self.streamer.clientAdded()