DoxigAlpha

flush

Function parameters

Parameters

#
w:*Writer

Type definitions in this namespace

Types

#

Initiates a TLS handshake and establishes a TLSv1.2 or TLSv1.3 session.

Functions

#
init
Initiates a TLS handshake and establishes a TLSv1.2 or TLSv1.3 session.
end
Sends a `close_notify` alert, which is necessary for the server to

Error sets in this namespace

Error Sets

#

The `Reader` supplied to `init` requires a buffer capacity

Values

#
min_buffer_len
The `Reader` supplied to `init` requires a buffer capacity

Source

Implementation

#
fn flush(w: *Writer) Writer.Error!void {
    const c: *Client = @alignCast(@fieldParentPtr("writer", w));
    const output = c.output;
    const ciphertext_buf = try output.writableSliceGreedy(min_buffer_len);
    const prepared = prepareCiphertextRecord(c, ciphertext_buf, w.buffered(), .application_data);
    output.advance(prepared.ciphertext_end);
    w.end = 0;
}