Skip to main content

drive

Function drive 

Source
async fn drive<S>(
    socket: &mut ClientSocket<S>,
    state: &Arc<TransportState>,
    peer: SocketAddr,
    settings: Receiver<Option<Arc<str>>>,
    sent_settings: Option<Arc<str>>,
    life: &mut ConnectionLife,
) -> Result<()>
where S: Stream<Item = Result<Message, Error>> + Sink<Message, Error = Error> + Unpin + Send,
Expand description

Read what a client sends, and hear what its subscriptions asked for.

Every client message that carries a question is answered: a client is never left waiting on a message this server chose to drop, which is the failure that reads as a hang rather than as an error. Five carry none and are deliberately answered with nothing - Showing, ClientPerf, Unsubscribe, BrowserDetach and BrowserResize are statements the server books, not requests.