Closed ajayyy closed 2 years ago
Script used to test:
import socketserver
import threading
import time
class MyTCPHandler(socketserver.BaseRequestHandler):
def handle(self):
print("{} connected".format(self.client_address[0]))
server = socketserver.ThreadingTCPServer(("localhost", int(8080)), MyTCPHandler)
server.daemon_threads = True
server_thread = threading.Thread(target=server.serve_forever)
server_thread.daemon = True
server_thread.start()
Run with python -i file.py
to keep connection open
Resolves #92
TODO:
- [ ] Make IP configurable?