Method
__init__
(self, port, workers, host='localhost')
Source from the content-addressed store, hash-verified
| 5 | |
| 6 | class Server: |
| 7 | def __init__(self, port, workers, host='localhost'): |
| 8 | self.host = host |
| 9 | self.port = port |
| 10 | self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) |
| 11 | |
| 12 | while (True): |
| 13 | try: |
| 14 | self.socket.bind((self.host, self.port)) |
| 15 | break |
| 16 | except OSError as e: |
| 17 | self.port += 1 |
| 18 | self.socket.listen(workers+2) |
| 19 | self.log = {} |
| 20 | |
| 21 | def start(self, folder, session): |
| 22 | log_file = [] |
Callers
nothing calls this directly
Tested by
no test coverage detected