(state: Dict[str, Any])
Sends the given dictionary as a state update to all connected clients.
Sends the given dictionary as a state update to all connected clients.
Sends the given dictionary as a state update to all connected clients .
def send_state(state: Dict[str, Any]) -> None:
    """Sends the given dictionary as a state update to all connected clients."""
    data = {"type": "state_update", "state": state}
    channel_layer = get_channel_layer()
    async_to_sync(channel_layer.group_send)("state", data)
def send_state ( state : Dict [ str , Any ] ) -> None : data = { "type" : "state_update" , "state" : state } channel_layer = get_channel_layer ( ) async_to_sync ( channel_layer . group_send ) ( "state" , data )