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

Function udp_req

sshuttle/server.py:379–392  ·  view source on GitHub ↗
(channel, cmd, data)

Source from the content-addressed store, hash-verified

377 udphandlers = {}
378
379 def udp_req(channel, cmd, data):
380 debug2('Incoming UDP request channel=%d, cmd=%d' %
381 (channel, cmd))
382 if cmd == ssnet.CMD_UDP_DATA:
383 (dstip, dstport, data) = data.split(b(','), 2)
384 dstport = int(dstport)
385 debug2('is incoming UDP data. %r %d.' % (dstip, dstport))
386 h = udphandlers[channel]
387 h.send((dstip, dstport), data)
388 elif cmd == ssnet.CMD_UDP_CLOSE:
389 debug2('is incoming UDP close')
390 h = udphandlers[channel]
391 h.ok = False
392 del mux.channels[channel]
393
394 def udp_open(channel, data):
395 debug2('Incoming UDP open.')

Callers 1

udp_openFunction · 0.85

Calls 3

debug2Function · 0.90
bFunction · 0.90
sendMethod · 0.45

Tested by

no test coverage detected