Fixed dispatcher and registry
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
import socket
|
||||
import json
|
||||
from dispatch import buildDispatch
|
||||
from dispatcher import dispatchRequest
|
||||
|
||||
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
|
||||
server.bind(("127.0.0.1", 19001))
|
||||
server.bind(("127.0.0.1", 19002))
|
||||
|
||||
lifecycles = {}
|
||||
|
||||
server.listen()
|
||||
|
||||
#lifecycles = {}
|
||||
|
||||
while True:
|
||||
connection, address = server.accept()
|
||||
while True:
|
||||
@@ -18,7 +22,7 @@ while True:
|
||||
# if not data:
|
||||
# break
|
||||
|
||||
dispatch = buildDispatch(request)
|
||||
dispatch = dispatchRequest(request, lifecycles)
|
||||
|
||||
connection.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user