Skip to main content

report_when_drained

Function report_when_drained 

Source
pub(super) async fn report_when_drained(
    socket: &mut WebSocket,
    drops: &LaneDrops,
    priority_rx: &Receiver<Value>,
    pending: &VecDeque<Value>,
) -> bool
Expand description

Tell the window about any events dropped since it last heard, once everything queued ahead of the report has been sent: the window re-fetches on hearing it, and a queued older update that arrived after the re-fetch could put back an object the re-fetch had just cleared. Returns true if the send failed (the caller should end the connection).