MCPcopy Index your code
hub / github.com/catchpoint/WebPageTest.tsproxy / __init__

Method __init__

tsproxy.py:384–395  ·  view source on GitHub ↗
(self, host, port)

Source from the content-addressed store, hash-verified

382class Socks5Server(asyncore.dispatcher):
383
384 def __init__(self, host, port):
385 asyncore.dispatcher.__init__(self)
386 self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
387 try:
388 self.set_reuse_addr()
389 self.bind((host, port))
390 self.listen(socket.SOMAXCONN)
391 self.ipaddr, self.port = self.socket.getsockname()
392 self.current_client_id = 0
393 except:
394 PrintMessage("Unable to listen on {0}:{1}. Is the port already in use?".format(host, port))
395 exit(1)
396
397 def handle_accept(self):
398 global connections, last_client_disconnected

Callers

nothing calls this directly

Calls 2

PrintMessageFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected