- for k in ('max_batch_down','max_queue_time','max_request_time',
+ for k in ('max_batch_down','max_queue_time','http_timeout',
'target_requests_outstanding'):
req = cfg.getint(cs, k)
limit = cfg.getint('limits',k)
'target_requests_outstanding'):
req = cfg.getint(cs, k)
limit = cfg.getint('limits',k)
def new_request(self, request):
request.setHeader('Content-Type','application/octet-stream')
def new_request(self, request):
request.setHeader('Content-Type','application/octet-stream')
def _check_outbound(self):
log_debug(DBG.HTTP_CTRL, 'CHKO')
while True:
def _check_outbound(self):
log_debug(DBG.HTTP_CTRL, 'CHKO')
while True:
self._log(DBG.HTTP_CTRL, 'CHKO processing', idof=request)
# request, and also some non-expired packets
self._pq.process((lambda: request.sentLength),
self._log(DBG.HTTP_CTRL, 'CHKO processing', idof=request)
# request, and also some non-expired packets
self._pq.process((lambda: request.sentLength),
# find client, update config, etc.
metadata = request.args[b'm'][0]
metadata = metadata.split(b'\r\n')
# find client, update config, etc.
metadata = request.args[b'm'][0]
metadata = metadata.split(b'\r\n')
- (ci_s, pw, tro) = metadata[0:3]
- desca['m[0,2]'] = [ci_s, tro]
+ (ci_s, pw, tro, cto) = metadata[0:4]
+ desca['m[0,2:3]'] = [ci_s, tro, cto]
if tro != cl.target_requests_outstanding:
raise ValueError('tro must be %d' % cl.target_requests_outstanding)
if tro != cl.target_requests_outstanding:
raise ValueError('tro must be %d' % cl.target_requests_outstanding)
try: process_request(request, desca)
except Exception as e:
emsg = traceback.format_exc()
try: process_request(request, desca)
except Exception as e:
emsg = traceback.format_exc()
request.setHeader('Content-Type','text/plain; charset="utf-8"')
request.setResponseCode(400)
return (emsg + ' # ' + repr(desca) + '\r\n').encode('utf-8')
request.setHeader('Content-Type','text/plain; charset="utf-8"')
request.setResponseCode(400)
return (emsg + ' # ' + repr(desca) + '\r\n').encode('utf-8')
-start_ipif(c.ipif_command, route)
+start_ipif(c.ipif_command, (lambda p,s,d: route(p,"[ipif]",s,d)))