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

Method callback

server.py:151–167  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

149 return
150
151 def callback(self):
152 try:
153 data = self.sock.recv(4096)
154 except socket.error, e:
155 if e.args[0] in ssnet.NET_ERRS:
156 # might have been spurious; try again.
157 # Note: these errors sometimes are reported by recv(),
158 # and sometimes by send(). We have to catch both.
159 debug2('DNS recv from %r: %s\n' % (self.peer, e))
160 self.try_send()
161 return
162 else:
163 log('DNS recv from %r: %s\n' % (self.peer, e))
164 return
165 debug2('DNS response: %d bytes\n' % len(data))
166 self.mux.send(self.chan, ssnet.CMD_DNS_RESPONSE, data)
167 self.ok = False
168
169
170def main():

Callers

nothing calls this directly

Calls 4

try_sendMethod · 0.95
debug2Function · 0.85
logFunction · 0.85
sendMethod · 0.80

Tested by

no test coverage detected