Ocamlnet 3 Reference Manual : Uq_ssl

# Module Uq_ssl

    module Uq_ssl: sig .. end

Asynchronous SSL connections

    exception Ssl_error of Ssl.ssl_error

Used in `when_done` callbacks to indicate an SSL-specific error code

    type ssl_socket_state = [ `Clean | `Client | `Server | `Unclean | `Unset ]

    class type ssl_multiplex_controller = object .. end

The `ssl_multiplex_controller` is an extended multiplex controller which can also control SSL handshakes.

    val create_ssl_multiplex_controller : ?close_inactive_descr:bool ->
           ?preclose:(unit -> unit) ->
           ?initial_state:ssl_socket_state ->
           ?timeout:float * exn ->
           Unix.file_descr ->
           Ssl.context -> Unixqueue.event_system -> ssl_multiplex_controller

Creates a multiplex controller for an SSL socket. The descriptor must be a connected socket descriptor.

`close_inactive_descr`: Whether to close the file descriptor by `inactivate`.

`preclose`: This function is called immediately before closing the descriptor

`initial_state`: can be set to ``Client` or ``Server` if the context is already established. Defaults to ``Unset`

`timeout`: if set to `(t, x)`, started operations time out after `t` seconds and pass the exception `x` back. A timeout is only indicated when all started operations are inactive for `t` seconds.

    val ssl_connect_engine : ssl_multiplex_controller -> unit Uq_engines.engine

This engine performs the client handshake.

    val ssl_accept_engine : ssl_multiplex_controller -> unit Uq_engines.engine

This engine performs the server handshake.

# Debugging

    module Debug: sig .. end