MCPcopy Index your code
hub / github.com/sshuttle/sshuttle / fill

Method fill

sshuttle/ssnet.py:459–473  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

457 self.outbuf[0:1] = []
458
459 def fill(self):
460 set_non_blocking_io(self.rfile.fileno())
461 try:
462 # If LATENCY_BUFFER_SIZE is inappropriately large, we will
463 # get a MemoryError here. Read no more than 1MiB.
464 read = _nb_clean(self.rfile.read, min(1048576, LATENCY_BUFFER_SIZE))
465 debug2('mux read: %r' % len(read))
466 except OSError:
467 _, e = sys.exc_info()[:2]
468 raise Fatal('other end: %r' % e)
469 # log('<<< %r' % b)
470 if read == b(''): # EOF
471 self.ok = False
472 if read:
473 self.inbuf += read
474
475 def handle(self):
476 self.fill()

Callers 2

handleMethod · 0.95
callbackMethod · 0.45

Calls 5

set_non_blocking_ioFunction · 0.90
debug2Function · 0.90
FatalClass · 0.90
bFunction · 0.90
_nb_cleanFunction · 0.85

Tested by

no test coverage detected