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

Method send

sshuttle/ssnet.py:389–399  ·  view source on GitHub ↗
(self, channel, cmd, data)

Source from the content-addressed store, hash-verified

387 self.too_full = True
388
389 def send(self, channel, cmd, data):
390 assert isinstance(data, bytes)
391 assert len(data) <= 65535
392 p = struct.pack('!ccHHH', b('S'), b('S'), channel, cmd, len(data)) \
393 + data
394 self.outbuf.append(p)
395 debug2(' > channel=%d cmd=%s len=%d (fullness=%d)'
396 % (channel, cmd_to_name.get(cmd, hex(cmd)),
397 len(data), self.fullness))
398 # debug3('>>> data: %r' % data)
399 self.fullness += len(data)
400
401 def got_packet(self, channel, cmd, data):
402 debug2('< channel=%d cmd=%s len=%d'

Callers 15

_mainFunction · 0.95
mainFunction · 0.95
__init__Method · 0.95
check_fullnessMethod · 0.95
got_packetMethod · 0.95
test_notify_no_messageFunction · 0.45
test_notify_socket_errorFunction · 0.45
test_notify_sendto_errorFunction · 0.45
test_notifyFunction · 0.45
expire_connectionsFunction · 0.45

Calls 3

bFunction · 0.90
debug2Function · 0.90
getMethod · 0.80

Tested by 6

test_notify_no_messageFunction · 0.36
test_notify_socket_errorFunction · 0.36
test_notify_sendto_errorFunction · 0.36
test_notifyFunction · 0.36