|
@@ -22,10 +22,10 @@ logger.addHandler(logging.StreamHandler(sys.stdout))
|
|
clients = {}
|
|
clients = {}
|
|
|
|
|
|
|
|
|
|
-async def handle_websocket(websocket, path):
|
|
|
|
|
|
+async def handle_websocket(websocket):
|
|
client_id = None
|
|
client_id = None
|
|
try:
|
|
try:
|
|
- splitted = path.split('/')
|
|
|
|
|
|
+ splitted = websocket.request.path.split('/')
|
|
splitted.pop(0)
|
|
splitted.pop(0)
|
|
client_id = splitted.pop(0)
|
|
client_id = splitted.pop(0)
|
|
print('Client {} connected'.format(client_id))
|
|
print('Client {} connected'.format(client_id))
|
|
@@ -75,4 +75,4 @@ async def main():
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|
|
- asyncio.run(main())
|
|
|
|
|
|
+ asyncio.run(main())
|