Sends TLS-encrypted data to stream
, which must conform to StreamInterface
. 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.