MCPcopy
hub / github.com/sshuttle/sshuttle / uread

Method uread

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

Source from the content-addressed store, hash-verified

238 return self.uwrite(buf)
239
240 def uread(self):
241 if self.connect_to:
242 return None # still connecting
243 if self.shut_read:
244 return
245 self.rsock.setblocking(False)
246 try:
247 return _nb_clean(self.rsock.recv, 65536)
248 except (OSError, socket.error):
249 _, e = sys.exc_info()[:2]
250 if e.errno == errno.EPIPE:
251 debug1('%r: uread: got EPIPE' % self)
252 self.noread()
253 return b('') # treat broken pipe as EOF
254 else:
255 self.seterr('uread: %s' % e)
256 return b('') # unexpected error... we'll call it EOF
257
258 def fill(self):
259 if self.buf:

Callers 1

fillMethod · 0.95

Calls 5

noreadMethod · 0.95
seterrMethod · 0.95
debug1Function · 0.90
bFunction · 0.90
_nb_cleanFunction · 0.85

Tested by

no test coverage detected