Sends TLS-encrypted data to stream
, which must conform to StreamInterface
. Returns the number of plaintext bytes sent, which may be fewer than bytes.len
. If end
is true, then this function additionally sends a close_notify
alert, which is necessary for the server to distinguish between a properly finished TLS session, or a truncation attack.