MCPcopy Create free account
hub / github.com/apenwarr/sshuttle / send

Method send

ssnet.py:356–364  ·  view source on GitHub ↗
(self, channel, cmd, data)

Source from the content-addressed store, hash-verified

354 #log('outbuf: %d %r\n' % (self.amount_queued(), ob))
355
356 def send(self, channel, cmd, data):
357 data = str(data)
358 assert(len(data) <= 65535)
359 p = struct.pack('!ccHHH', 'S', 'S', channel, cmd, len(data)) + data
360 self.outbuf.append(p)
361 debug2(' > channel=%d cmd=%s len=%d (fullness=%d)\n'
362 % (channel, cmd_to_name.get(cmd,hex(cmd)),
363 len(data), self.fullness))
364 self.fullness += len(data)
365
366 def got_packet(self, channel, cmd, data):
367 debug2('< channel=%d cmd=%s len=%d\n'

Callers 14

_mainFunction · 0.95
mainFunction · 0.95
__init__Method · 0.95
check_fullnessMethod · 0.95
got_packetMethod · 0.95
onacceptFunction · 0.80
ondnsFunction · 0.80
stresstest.pyFile · 0.80
try_sendMethod · 0.80
callbackMethod · 0.80
hostwatch_readyFunction · 0.80
noreadMethod · 0.80

Calls 1

debug2Function · 0.85

Tested by

no test coverage detected