Function end [src]
If the connection is a TLS connection, sends the close_notify alert.
Flushes all buffers.
Prototype
pub fn end(c: *Connection) Writer.Error!void
Parameters
c: *Connection
Source
pub fn end(c: *Connection) Writer.Error!void {
if (c.protocol == .tls) {
if (disable_tls) unreachable;
const tls: *Tls = @alignCast(@fieldParentPtr("connection", c));
try tls.client.end();
}
try c.stream_writer.interface.flush();
}