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

Function hostwatch_ready

sshuttle/server.py:331–344  ·  view source on GitHub ↗
(sock)

Source from the content-addressed store, hash-verified

329 hw.leftover = b('')
330
331 def hostwatch_ready(sock):
332 assert hw.pid
333 content = hw.sock.recv(4096)
334 if content:
335 lines = (hw.leftover + content).split(b('\n'))
336 if lines[-1]:
337 # no terminating newline: entry isn't complete yet!
338 hw.leftover = lines.pop()
339 lines.append(b(''))
340 else:
341 hw.leftover = b('')
342 mux.send(0, ssnet.CMD_HOST_LIST, b('\n').join(lines))
343 else:
344 raise Fatal('hostwatch process died')
345
346 def got_host_req(data):
347 if not hw.pid:

Callers

nothing calls this directly

Calls 3

bFunction · 0.90
FatalClass · 0.90
sendMethod · 0.45

Tested by

no test coverage detected