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.
- config: an initialised config with a certificate and key.
- reader: where the bytes from the client come from.
- writer: where the bytes to the client go.
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.