Beispiel #1
0
 def _raise_on_close(self, message: Message) -> None:
     if message["type"] == "websocket.close":
         raise WebSocketDisconnect(message.get("code", 1000))
Beispiel #2
0
 def _raise_on_disconnect(self, message: Message) -> None:
     if message["type"] == "websocket.disconnect":
         raise WebSocketDisconnect(message["code"])