Function pueue_lib::network::protocol::receive_bytes[][src]

pub async fn receive_bytes(stream: &mut GenericStream) -> Result<Vec<u8>, Error>
Expand description

Receive a byte stream.
This is the basic protocol beneath all pueue communication.

  1. The client sends a u64, which specifies the length of the payload.
  2. Receive chunks of 1400 bytes until we finished all expected bytes