12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364open!Coreopen!AsyncmoduletypeFd=sigtypetvalread:t->bytes->[`Okofint|`Eof]Deferred.Or_error.tvalwrite_full:t->string->unitDeferred.Or_error.tendmoduletypeS=sigmoduleFd:Fd(** Abstract type of a session *)typet(** {2 Constructors} *)(** [server_of_fd server fd] is [t], after server-side TLS
handshake of [fd] using [server] configuration. *)valserver_of_fd:Tls.Config.server->Fd.t->tDeferred.Or_error.t(** [client_of_fd client ~host fd] is [t], after client-side
TLS handshake of [fd] using [client] configuration and [host]. *)valclient_of_fd:Tls.Config.client->?host:[`host]Domain_name.t->Fd.t->tDeferred.Or_error.t(** {2 Common stream operations} *)(** [read t buffer] is [length], the number of bytes read into
[buffer]. *)valread:t->bytes->intDeferred.Or_error.t(** [writev t buffers] writes the [buffers] to the session. *)valwritev:t->stringlist->unitDeferred.Or_error.t(** [close t] closes the TLS session by sending a close notify to the peer. *)valclose_tls:t->unitDeferred.Or_error.t(** [reneg ~authenticator ~acceptable_cas ~cert ~drop t] renegotiates the
session, and blocks until the renegotiation finished. Optionally, a new
[authenticator] and [acceptable_cas] can be used. The own certificate can
be adjusted by [cert]. If [drop] is [true] (the default),
application data received before the renegotiation finished is dropped. *)valreneg:?authenticator:X509.Authenticator.t->?acceptable_cas:X509.Distinguished_name.tlist->?cert:Tls.Config.own_cert->?drop:bool->t->unitDeferred.Or_error.t(** [key_update ~request t] updates the traffic key and requests a traffic key
update from the peer if [request] is provided and [true] (the default).
This is only supported in TLS 1.3. *)valkey_update:?request:bool->t->unitDeferred.Or_error.t(** [epoch t] returns [epoch], which contains information of the
active session. *)valepoch:t->Tls.Core.epoch_dataOr_error.tend