CoolFace
Apppublic

Coder19/interview_system

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
connection_manager.py14 linesDownload Raw Back to webrtc
1class ConnectionManager:2    def __init__(self):3        self.active_connections = []4 5    async def connect(self, websocket):6        await websocket.accept()7        self.active_connections.append(websocket)8 9    async def disconnect(self, websocket):10        self.active_connections.remove(websocket)11 12    async def send_message(self, websocket, message: bytes):13        await websocket.send_bytes(message)14