(self, host, port)
| 382 | class 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 |
nothing calls this directly
no test coverage detected