Refined dispatcher and threading. Added lifecycle registry

This commit is contained in:
Lyncoln
2026-10-09 16:40:48 -04:00
parent e6b2722708
commit 8d91b8d716
42 changed files with 294 additions and 76 deletions
+29
View File
@@ -0,0 +1,29 @@
import socket
import json
from dispatcher import dispatchRequest
#from createthread import buildThread
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.bind(("127.0.0.1", 19002))
lifecycles = {}
server.listen()
while True:
connection, address = server.accept()
while True:
data = connection.recv(4096)
request = json.loads(data)
# if not data:
# break
dispatch = dispatchRequest(request, lifecycles)
connection.close()
# server.close()