Waits for data and reads what is there, up to buffer.count bytes. 0 is the end: the peer sent
close_notify. A connection that ends without it is an error (.CONNECTION_RESET, and
last_error says .TRUNCATED): the data may have been cut off.
- stream: the stream to read from.
- buffer: where the bytes go. Empty returns 0 at once.
read :: (stream: *Tls_Stream, buffer: [] u8) -> (s64, Io.Io_Error)
Waits for data and reads what is there, up to buffer.count bytes. 0 is the end: the peer sent
close_notify. A connection that ends without it is an error (.CONNECTION_RESET, and
last_error says .TRUNCATED): the data may have been cut off.
Parameters
- stream: *Tls_Stream
- the stream to read from.
- buffer: [] u8
- where the bytes go. Empty returns 0 at once.
Returns
- s64