Module Lwt_sslSource

OCaml-SSL integration

This module is provided by OPAM package lwt_ssl. Link with ocamlfind package lwt_ssl.

Sourcetype socket

Wrapper for SSL sockets.

It is either a plain socket, either a real SSL socket.

Sourcetype uninitialized_socket

Wrapper for SSL sockets that have not yet performed the SSL handshake.

Sourceval ssl_socket : socket -> Ssl.socket option

Returns the underlying SSL socket used for this wrapper. If it is a plain socket it returns None.

Sourceval ssl_socket_of_uninitialized_socket : uninitialized_socket -> Ssl.socket

Returns the underlying SSL socket used for this wrapper.

Sourceval is_ssl : socket -> bool

Are we using an SSL socket?

Sourceval ssl_accept : Lwt_unix.file_descr -> Ssl.context -> socket Lwt.t
Sourceval ssl_connect : Lwt_unix.file_descr -> Ssl.context -> socket Lwt.t
Sourceval embed_uninitialized_socket : Lwt_unix.file_descr -> Ssl.context -> uninitialized_socket
Sourceval ssl_perform_handshake : uninitialized_socket -> socket Lwt.t

Initiate a SSL/TLS handshake on the specified socket (used by clients).

Sourceval ssl_accept_handshake : uninitialized_socket -> socket Lwt.t

Await a SSL/TLS handshake on the specified socket (used by servers).

Sourceval read : socket -> bytes -> int -> int -> int Lwt.t
Sourceval write : socket -> bytes -> int -> int -> int Lwt.t
Sourceval read_bytes : socket -> Lwt_bytes.t -> int -> int -> int Lwt.t
Sourceval write_bytes : socket -> Lwt_bytes.t -> int -> int -> int Lwt.t
Sourceval wait_read : socket -> unit Lwt.t
Sourceval wait_write : socket -> unit Lwt.t
Sourceval shutdown : socket -> Unix.shutdown_command -> unit
Sourceval close : socket -> unit Lwt.t
Sourceval in_channel_of_descr : ?buffer:Lwt_bytes.t -> socket -> Lwt_io.input_channel
Sourceval out_channel_of_descr : ?buffer:Lwt_bytes.t -> socket -> Lwt_io.output_channel
Sourceval close_notify : socket -> bool Lwt.t
Sourceval ssl_shutdown : socket -> unit Lwt.t
Sourceval abort : socket -> exn -> unit
Sourceval get_unix_fd : socket -> Unix.file_descr
Sourceval getsockname : socket -> Unix.sockaddr
Sourceval getpeername : socket -> Unix.sockaddr