Expand description

Asynchronous reading and writing of messages using the packed stream encoding.

Structs

  • An AsyncRead wrapper that unpacks packed data.
  • An AsyncWrite wrapper that packs any data passed into it.

Functions

  • Asynchronously reads a message from reader.
  • Asynchronously reads a packed message from read. Returns None if read has zero bytes left (i.e. is at end-of-file). To read a stream containing an unknown number of messages, you could call this function repeatedly until it returns None.
  • Writes the provided message to writer. Does not call writer.flush(), so that multiple successive calls can amortize work when writer is buffered.