package tls-miou-unix
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=d51940587bce9475c977c596904c8179dcd784d9ef6dd9afe3e634cca940c9f3
sha512=9d9e9ebc9bd4aa7a87bd438c5fbf38e3529cbd916c2995a25473a1f6d8443ae1ab99b89ba9d074272e00631aafa47bfcf4e23466fa28f1f10bb83167402b7268
doc/tls-miou-unix/Tls_miou_unix/index.html
Module Tls_miou_unixSource
Effectful operations using Miou for pure TLS.
The pure TLS is state and buffer in, state and buffer out. This module uses Miou (and its Unix layer) for communication over the network.
Abstract type of a session.
file_descr returns the underlying file-descriptor used by the given TLS socket.
read fd buf ~off ~len reads up to len bytes (defaults to Bytes.length buf - off from the given TLS socket fd, storing them in byte sequence buf, starting at position off in buf (defaults to 0). It returns the actual number of characters read, between 0 and len (inclusive).
really_read fd buf ~off ~len reads len bytes (defaults to Bytes.length buf - off) from the given TLS socket fd, storing them in byte sequence buf, starting at position off in buf (defaults to 0). If len = 0, really_read does nothing.
write t str ~off ~len writes len bytes (defaults to String.length str - off) from byte sequence str, starting at offset off (defaults to 0), to the given TLS socket fd.
shutdown t direction closes the direction of the TLS session t. If `read_write or `write is closed, a TLS close-notify is sent to the other endpoint. If this results in a fully-closed session (or an errorneous session), the underlying file descriptor is closed.
val client_of_fd :
Tls.Config.client ->
?read_buffer_size:int ->
?host:[ `host ] Domain_name.t ->
?ip:Ipaddr.t ->
Miou_unix.file_descr ->
tclient_of_flow client ~host ~ip fd is t, after client-side TLS handshake of fd using client configuration and host or ip.
Returns a TLS flow which may be fully active or half-closed.
server_of_fd server fd is t, after server-side TLS handshake of fd using server configuration.
Returns a TLS flow which may be fully active or half-closed.
connect authenticator (host, port) is t, a connected TLS connection to host on port using the default configuration and the authenticator.
Returns a TLS flow which may be fully active or half-closed.
epoch t returns epoch, which contains information of the session.