Refactoring, added docstrings
This commit is contained in:
@@ -10,6 +10,12 @@ service = Service()
|
||||
|
||||
|
||||
async def serve_websocket(websocket: WebSocket, room_name: str):
|
||||
"""
|
||||
Serves websocket
|
||||
:param websocket: Ws to serve
|
||||
:param room_name: Room name to connect ws to
|
||||
:return:
|
||||
"""
|
||||
print(f'Connection opened room {room_name}')
|
||||
room = await service.get_room(room_name)
|
||||
connection = await room.accept_connection(websocket)
|
||||
|
||||
Reference in New Issue
Block a user