Lwt_sslOCaml-SSL integration
This module is provided by OPAM package lwt_ssl. Link with ocamlfind package lwt_ssl.
val ssl_socket : socket -> Ssl.socket optionReturns the underlying SSL socket used for this wrapper. If it is a plain socket it returns None.
val ssl_socket_of_uninitialized_socket : uninitialized_socket -> Ssl.socketReturns the underlying SSL socket used for this wrapper.
val is_ssl : socket -> boolAre we using an SSL socket?
val ssl_accept : Lwt_unix.file_descr -> Ssl.context -> socket Lwt.tval ssl_connect : Lwt_unix.file_descr -> Ssl.context -> socket Lwt.tval plain : Lwt_unix.file_descr -> socketval embed_socket : Lwt_unix.file_descr -> Ssl.context -> socketval embed_uninitialized_socket :
Lwt_unix.file_descr ->
Ssl.context ->
uninitialized_socketval ssl_perform_handshake : uninitialized_socket -> socket Lwt.tInitiate a SSL/TLS handshake on the specified socket (used by clients).
val ssl_accept_handshake : uninitialized_socket -> socket Lwt.tAwait a SSL/TLS handshake on the specified socket (used by servers).
val read : socket -> bytes -> int -> int -> int Lwt.tval write : socket -> bytes -> int -> int -> int Lwt.tval read_bytes : socket -> Lwt_bytes.t -> int -> int -> int Lwt.tval write_bytes : socket -> Lwt_bytes.t -> int -> int -> int Lwt.tval wait_read : socket -> unit Lwt.tval wait_write : socket -> unit Lwt.tval shutdown : socket -> Unix.shutdown_command -> unitval close : socket -> unit Lwt.tval in_channel_of_descr : ?buffer:Lwt_bytes.t -> socket -> Lwt_io.input_channelval out_channel_of_descr :
?buffer:Lwt_bytes.t ->
socket ->
Lwt_io.output_channelval ssl_shutdown : socket -> unit Lwt.tval abort : socket -> exn -> unitval get_fd : socket -> Lwt_unix.file_descrval get_unix_fd : socket -> Unix.file_descrval getsockname : socket -> Unix.sockaddrval getpeername : socket -> Unix.sockaddr