INNER CODE UNIT · Python

__init__

permitio/fastapi_websocket_rpc · fastapi_websocket_rpc/connection_manager.py:7

    def __init__(self):
        self.active_connections: List[WebSocket] = []

    async def connect(self, websocket: WebSocket):
        await websocket.accept()
        self.active_connections.append(websocket)

    def disconnect(self, websocket: WebSocket):
        self.active_connections.remove(websocket)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…