Receives TLS-encrypted data from stream
, which must conform to StreamInterface
. Returns the number of bytes read. If the number read is smaller than buffer.len
, it means the stream reached the end. Reaching the end of the stream is not an error condition.