Skip to main content

flush

Function flush 

Source
pub async fn flush<S>(socket: &mut S, frames: Vec<SeatUpdate>) -> Result<()>
where S: Sink<Message, Error = Error> + Unpin,
Expand description

Write a run of updates to a client: every one its own frame - the token appends among them folded into the one frame they draw as - in the order given, and ONE flush for the lot.

A run is a batch drained by its deadline, or the backlog a subscribe is handed before its snapshot. Nothing held is nothing to write, which the caller relies on when it clears the way for an answer.