Tls module

read

procedure · 1 overloadSource

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.

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

See also