Tls module

tls_accept

procedure · 1 overloadSource

Runs the server handshake. The config needs a certificate and key. On success the stream owns the connection; on an error the caller closes it.

tls_accept :: (
    config: *Tls_Config,
    reader: Io.Reader,
    writer: Io.Writer
) -> (*Tls_Stream, Tls_Error)

Runs the server handshake. The config needs a certificate and key. On success the stream owns the connection; on an error the caller closes it.

Parameters

config: *Tls_Config
an initialised config with a certificate and key.
reader: Io.Reader
where the bytes from the client come from.
writer: Io.Writer
where the bytes to the client go.

Returns

See also