# Module Uq_engines_compat

    module Uq_engines_compat: sig .. end

Compatibility with OCamlnet-3

In Ocamlnet-4 many definitions were moved to separate modules that once used to reside in `Uq_engines`. In order to ease the transition, this module here provides the old version of `Uq_engines`.

In order to use it, just put this line at the beginnging of the ml file:

     module Uq_engines = Uq_engines_compat

Note that this is really meant as a help for getting through transition phases. This module will disappear in future versions of OCamlnet.

    exception Closed_channel

    exception Broken_communication

    exception Watchdog_timeout

    exception Timeout

    exception Addressing_method_not_supported

    exception Cancelled

    type 't engine_state = [ `Aborted | `Done of 't | `Error of exn | `Working of int ]

    type 't final_state = [ `Aborted | `Done of 't | `Error of exn ]

    val string_of_state : 'a engine_state -> string

    class type ['t] engine = object .. end

    class ['t] delegate_engine : 't #engine -> ['t] engine

    val when_state : ?is_done:('a -> unit) ->
           ?is_error:(exn -> unit) ->
           ?is_aborted:(unit -> unit) ->
           ?is_progressing:(int -> unit) -> 'a #engine -> unit

    class ['a] signal_engine : Unixqueue.event_system -> object .. end

    val signal_engine : Unixqueue.event_system ->
           'a engine * ('a final_state -> unit)

    class [['a, 'b]] map_engine : map_done:('a -> 'b engine_state) -> ?map_error:exn -> 'b engine_state -> ?map_aborted:unit -> 'b engine_state -> ?propagate_working:bool -> 'a #engine -> ['b] engine

    val map_engine : map_done:('a -> 'b engine_state) ->
           ?map_error:(exn -> 'b engine_state) ->
           ?map_aborted:(unit -> 'b engine_state) ->
           ?propagate_working:bool ->
           'a #engine -> 'b engine

    class [['a, 'b]] fmap_engine : 'a #engine -> ('a final_state -> 'b final_state) -> ['b] engine

    val fmap_engine : 'a #engine ->
           ('a final_state -> 'b final_state) ->
           'b engine

    class ['a] meta_engine : 'a #engine -> ['a final_state] engine

    val meta_engine : 'a #engine ->
           'a final_state engine

    class ['t] epsilon_engine : 't engine_state -> Unixqueue.event_system -> ['t] engine

    val epsilon_engine : 't engine_state ->
           Unixqueue.event_system -> 't engine

    class [['a, 'b]] seq_engine : 'a #engine -> ('a -> 'b #engine) -> ['b] engine

    val seq_engine : 'a #engine ->
           ('a -> 'b #engine) -> 'b engine

    class [['a, 'b]] qseq_engine : 'a #engine -> ('a -> 'b #engine) -> ['b] engine

    val qseq_engine : 'a #engine ->
           ('a -> 'b #engine) -> 'b engine

    class ['a] stream_seq_engine : 'a -> ('a -> 'a #engine) Stream.t -> Unixqueue.event_system -> ['a] engine

    val stream_seq_engine : 'a ->
           ('a -> 'a #engine) Stream.t ->
           Unixqueue.event_system -> 'a engine

    class [['a, 'b]] sync_engine : 'a #engine -> 'b #engine -> [('a * 'b)] engine

    val sync_engine : 'a #engine ->
           'b #engine -> ('a * 'b) engine

    class [['a, 'b]] msync_engine : 'a #engine list -> ('a -> 'b -> 'b) -> 'b -> Unixqueue.event_system -> ['b] engine

    val msync_engine : 'a #engine list ->
           ('a -> 'b -> 'b) ->
           'b -> Unixqueue.event_system -> 'b engine

    class ['a] delay_engine : float -> (unit -> 'a #engine) -> Unixqueue.event_system -> ['a] engine

    val delay_engine : float ->
           (unit -> 'a #engine) ->
           Unixqueue.event_system -> 'a engine

    class ['a] timeout_engine : float -> exn -> 'a engine -> ['a] engine

    val timeout_engine : float -> exn -> 'a engine -> 'a engine

    class watchdog : float -> 'a #engine -> [unit] engine

    val watchdog : float -> 'a #engine -> unit engine

    class type ['a] serializer_t = object .. end

    class ['a] serializer : Unixqueue.event_system -> ['a] serializer_t

    val serializer : Unixqueue.event_system -> 'a serializer_t

    class type ['a] prioritizer_t = object .. end

    class ['a] prioritizer : Unixqueue.event_system -> ['a] prioritizer_t

    val prioritizer : Unixqueue.event_system -> 'a prioritizer_t

    class type ['a] cache_t = object .. end

    class ['a] cache : (Unixqueue.event_system -> 'a engine) -> Unixqueue.event_system -> ['a] cache_t

    val cache : (Unixqueue.event_system -> 'a engine) ->
           Unixqueue.event_system -> 'a cache_t

    class ['t] engine_mixin : 't engine_state -> Unixqueue.event_system -> object .. end

    module Operators: sig .. end

    class poll_engine : ?extra_match:exn -> bool -> (Unixqueue.operation * float) list -> Unixqueue.event_system -> object .. end

    class ['a] input_engine : (Unix.file_descr -> 'a) -> Unix.file_descr -> float -> Unixqueue.event_system -> ['a] engine

    class ['a] output_engine : (Unix.file_descr -> 'a) -> Unix.file_descr -> float -> Unixqueue.event_system -> ['a] engine

    class poll_process_engine : ?period:float -> pid:int -> Unixqueue.event_system -> [Unix.process_status] engine

    class type async_out_channel = object .. end

    class type async_in_channel = object .. end

    class pseudo_async_out_channel : #Netchannels.raw_out_channel -> async_out_channel

    class pseudo_async_in_channel : #Netchannels.raw_in_channel -> async_in_channel

    class receiver : src:Unix.file_descr -> dst:#async_out_channel -> ?close_src:bool -> ?close_dst:bool -> Unixqueue.event_system -> [unit] engine

    class sender : src:#async_in_channel -> dst:Unix.file_descr -> ?close_src:bool -> ?close_dst:bool -> Unixqueue.event_system -> [unit] engine

    class type async_out_channel_engine = object .. end

    class type async_in_channel_engine = object .. end

    class output_async_descr : dst:Unix.file_descr -> ?buffer_size:int -> ?close_dst:bool -> Unixqueue.event_system -> async_out_channel_engine

    class input_async_descr : src:Unix.file_descr -> ?buffer_size:int -> ?close_src:bool -> Unixqueue.event_system -> async_in_channel_engine

    type copy_task = [ `Bidirectional of Unix.file_descr * Unix.file_descr
           | `Tridirectional of Unix.file_descr * Unix.file_descr * Unix.file_descr
           | `Uni_socket of Unix.file_descr * Unix.file_descr
           | `Unidirectional of Unix.file_descr * Unix.file_descr ]

    class copier : copy_task -> Unixqueue.event_system -> [unit] engine

    type inetspec = [ `Sock_inet of Unix.socket_type * Unix.inet_addr * int
           | `Sock_inet_byname of Unix.socket_type * string * int ]

    type sockspec = [ `Sock_inet of Unix.socket_type * Unix.inet_addr * int
           | `Sock_inet_byname of Unix.socket_type * string * int
           | `Sock_unix of Unix.socket_type * string ]

    val sockspec_of_sockaddr : Unix.socket_type -> Unix.sockaddr -> sockspec

    val sockspec_of_socksymbol : Unix.socket_type -> Netsockaddr.socksymbol -> sockspec

    type connect_address = [ `Command of string * (int -> Unixqueue.event_system -> unit)
           | `Socket of sockspec * connect_options
           | `W32_pipe of Netsys_win32.pipe_mode * string ]

    type connect_options = Uq_engines.connect_options = {

`` | `conn_bind : `sockspec option`;` | `(*` | Bind the connecting socket to this address (same family as the connected socket required). `None`: Use an anonymous port. | `*)`

}

    val default_connect_options : connect_options

    type connect_status = [ `Command of Unix.file_descr * int
           | `Socket of Unix.file_descr * sockspec
           | `W32_pipe of Unix.file_descr ]

    val client_endpoint : connect_status -> Unix.file_descr

    val client_socket : connect_status -> Unix.file_descr

    class type client_endpoint_connector = object .. end

    class type client_socket_connector = client_endpoint_connector

    val connector : ?proxy:#client_socket_connector ->
           connect_address ->
           Unixqueue.event_system ->
           connect_status engine

    type listen_options = Uq_engines.listen_options = {

`` | `lstn_backlog : `int`;`
`` | `lstn_reuseaddr : `bool`;`

}

    type listen_address = [ `Socket of sockspec * listen_options
           | `W32_pipe of
               Netsys_win32.pipe_mode * string * listen_options ]

    val default_listen_options : listen_options

    class type server_endpoint_acceptor = object .. end

    class type server_socket_acceptor = server_endpoint_acceptor

    class direct_acceptor : ?close_on_shutdown:bool -> ?preclose:unit -> unit -> Unix.file_descr -> Unixqueue.event_system -> server_endpoint_acceptor

    class direct_socket_acceptor : Unix.file_descr -> Unixqueue.event_system -> server_endpoint_acceptor

    class type server_endpoint_listener = object .. end

    class type server_socket_listener = server_endpoint_listener

    val listener : ?proxy:#server_socket_listener ->
           listen_address ->
           Unixqueue.event_system ->
           server_socket_acceptor engine

    type datagram_type = [ `Inet6_udp | `Inet_udp | `Unix_dgram ]

    class type wrapped_datagram_socket = object .. end

    class type datagram_socket_provider = object .. end

    val datagram_provider : ?proxy:#datagram_socket_provider ->
           datagram_type ->
           Unixqueue.event_system ->
           wrapped_datagram_socket engine

    class type multiplex_controller = object .. end

    exception Mem_not_supported

    val create_multiplex_controller_for_connected_socket : ?close_inactive_descr:bool ->
           ?preclose:(unit -> unit) ->
           ?supports_half_open_connection:bool ->
           ?timeout:float * exn ->
           Unix.file_descr ->
           Unixqueue.unix_event_system -> multiplex_controller

    class type datagram_multiplex_controller = object .. end

    val create_multiplex_controller_for_datagram_socket : ?close_inactive_descr:bool ->
           ?preclose:(unit -> unit) ->
           ?timeout:float * exn ->
           Unix.file_descr ->
           Unixqueue.unix_event_system ->
           datagram_multiplex_controller

    type onshutdown_out_spec = [ `Action of
               async_out_channel_engine ->
               multiplex_controller ->
               unit engine_state -> unit
           | `Ignore
           | `Initiate_shutdown ]

    type onshutdown_in_spec = [ `Action of
               async_in_channel_engine ->
               multiplex_controller ->
               unit engine_state -> unit
           | `Ignore
           | `Initiate_shutdown ]

    class output_async_mplex : ?onclose:[ `Ignore | `Write_eof ] -> ?onshutdown:onshutdown_out_spec -> ?buffer_size:int -> multiplex_controller -> async_out_channel_engine

    class input_async_mplex : ?onshutdown:onshutdown_in_spec -> ?buffer_size:int -> multiplex_controller -> async_in_channel_engine

    module Debug: sig .. end