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

Method sethostip

sshuttle/client.py:457–461  ·  view source on GitHub ↗
(self, hostname, ip)

Source from the content-addressed store, hash-verified

455 raise Fatal('%r expected STARTED, got %r' % (self.argv, line))
456
457 def sethostip(self, hostname, ip):
458 assert not re.search(br'[^-\w\.]', hostname)
459 assert not re.search(br'[^0-9.]', ip)
460 self.pfile.write(b'HOST %s,%s\n' % (hostname, ip))
461 self.pfile.flush()
462
463 def done(self):
464 self.pfile.close()

Callers 1

onhostlistFunction · 0.80

Calls 2

writeMethod · 0.80
flushMethod · 0.80

Tested by

no test coverage detected