Function writeAllEnd [src]
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.
Prototype
pub fn writeAllEnd(c: *Client, stream: anytype, bytes: []const u8, end: bool) !void
Parameters
c: *Client
bytes: []const u8
end: bool
Source
pub fn writeAllEnd(c: *Client, stream: anytype, bytes: []const u8, end: bool) !void {
var index: usize = 0;
while (index < bytes.len) {
index += try c.writeEnd(stream, bytes[index..], end);
}
}