Function bore_cli::shared::recv_json_timeout
source · [−]pub async fn recv_json_timeout<T: DeserializeOwned>(
reader: &mut impl AsyncBufRead + Unpin
) -> Result<Option<T>>Expand description
Read the next null-delimited JSON instruction, with a default timeout.
This is useful for parsing the initial message of a stream for handshake or other protocol purposes, where we do not want to wait indefinitely.