`sig
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 Uq_engines_compat.engine_state -> string
class type ['t] engine =
object
method abort : unit -> unit
method event_system : Unixqueue.event_system
method request_notification : (unit -> bool) -> unit
method request_proxy_notification :
('t Uq_engines_compat.engine -> bool) -> unit
method state : 't Uq_engines_compat.engine_state
end
class ['t] delegate_engine : 't #Uq_engines_compat.engine -> ['t] engine
val when_state :
?is_done:('a -> unit) ->
?is_error:(exn -> unit) ->
?is_aborted:(unit -> unit) ->
?is_progressing:(int -> unit) -> 'a #Uq_engines_compat.engine -> unit
class ['a] signal_engine :
Unixqueue.event_system ->
object
method abort : unit -> unit
method event_system : Unixqueue.event_system
method request_notification : (unit -> bool) -> unit
method request_proxy_notification : ('a engine -> bool) -> unit
method signal : 'a Uq_engines_compat.final_state -> unit
method state : 'a engine_state
end
val signal_engine :
Unixqueue.event_system ->
'a Uq_engines_compat.engine * ('a Uq_engines_compat.final_state -> unit)
class ['a, 'b] map_engine :
map_done:('a -> 'b Uq_engines_compat.engine_state) ->
?map_error:(exn -> 'b Uq_engines_compat.engine_state) ->
?map_aborted:(unit -> 'b Uq_engines_compat.engine_state) ->
?propagate_working:bool -> 'a #Uq_engines_compat.engine -> ['b] engine
val map_engine :
map_done:('a -> 'b Uq_engines_compat.engine_state) ->
?map_error:(exn -> 'b Uq_engines_compat.engine_state) ->
?map_aborted:(unit -> 'b Uq_engines_compat.engine_state) ->
?propagate_working:bool ->
'a #Uq_engines_compat.engine -> 'b Uq_engines_compat.engine
class ['a, 'b] fmap_engine :
'a #Uq_engines_compat.engine ->
('a Uq_engines_compat.final_state -> 'b Uq_engines_compat.final_state) ->
['b] engine
val fmap_engine :
'a #Uq_engines_compat.engine ->
('a Uq_engines_compat.final_state -> 'b Uq_engines_compat.final_state) ->
'b Uq_engines_compat.engine
class ['a] meta_engine :
'a #Uq_engines_compat.engine -> ['a Uq_engines_compat.final_state] engine
val meta_engine :
'a #Uq_engines_compat.engine ->
'a Uq_engines_compat.final_state Uq_engines_compat.engine
class ['t] epsilon_engine :
't Uq_engines_compat.engine_state ->
Unixqueue.event_system -> ['t] engine
val epsilon_engine :
't Uq_engines_compat.engine_state ->
Unixqueue.event_system -> 't Uq_engines_compat.engine
class ['a, 'b] seq_engine :
'a #Uq_engines_compat.engine ->
('a -> 'b #Uq_engines_compat.engine) -> ['b] engine
val seq_engine :
'a #Uq_engines_compat.engine ->
('a -> 'b #Uq_engines_compat.engine) -> 'b Uq_engines_compat.engine
class ['a, 'b] qseq_engine :
'a #Uq_engines_compat.engine ->
('a -> 'b #Uq_engines_compat.engine) -> ['b] engine
val qseq_engine :
'a #Uq_engines_compat.engine ->
('a -> 'b #Uq_engines_compat.engine) -> 'b Uq_engines_compat.engine
class ['a] stream_seq_engine :
'a ->
('a -> 'a #Uq_engines_compat.engine) Stdlib.Stream.t ->
Unixqueue.event_system -> ['a] engine
val stream_seq_engine :
'a ->
('a -> 'a #Uq_engines_compat.engine) Stdlib.Stream.t ->
Unixqueue.event_system -> 'a Uq_engines_compat.engine
class ['a, 'b] sync_engine :
'a #Uq_engines_compat.engine ->
'b #Uq_engines_compat.engine -> ['a * 'b] engine
val sync_engine :
'a #Uq_engines_compat.engine ->
'b #Uq_engines_compat.engine -> ('a * 'b) Uq_engines_compat.engine
class ['a, 'b] msync_engine :
'a #Uq_engines_compat.engine list ->
('a -> 'b -> 'b) -> 'b -> Unixqueue.event_system -> ['b] engine
val msync_engine :
'a #Uq_engines_compat.engine list ->
('a -> 'b -> 'b) ->
'b -> Unixqueue.event_system -> 'b Uq_engines_compat.engine
class ['a] delay_engine :
float ->
(unit -> 'a #Uq_engines_compat.engine) ->
Unixqueue.event_system -> ['a] engine
val delay_engine :
float ->
(unit -> 'a #Uq_engines_compat.engine) ->
Unixqueue.event_system -> 'a Uq_engines_compat.engine
class ['a] timeout_engine :
float -> exn -> 'a Uq_engines_compat.engine -> ['a] engine
val timeout_engine :
float ->
exn -> 'a Uq_engines_compat.engine -> 'a Uq_engines_compat.engine
class watchdog : float -> 'a #Uq_engines_compat.engine -> [unit] engine
val watchdog :
float -> 'a #Uq_engines_compat.engine -> unit Uq_engines_compat.engine
class type ['a] serializer_t =
object
method serialized :
(Unixqueue.event_system -> 'a Uq_engines_compat.engine) ->
'a Uq_engines_compat.engine
end
class ['a] serializer : Unixqueue.event_system -> ['a] serializer_t
val serializer :
Unixqueue.event_system -> 'a Uq_engines_compat.serializer_t
class type ['a] prioritizer_t =
object
method prioritized :
(Unixqueue.event_system -> 'a Uq_engines_compat.engine) ->
int -> 'a Uq_engines_compat.engine
end
class ['a] prioritizer : Unixqueue.event_system -> ['a] prioritizer_t
val prioritizer :
Unixqueue.event_system -> 'a Uq_engines_compat.prioritizer_t
class type ['a] cache_t =
object
method abort : unit -> unit
method get_engine : unit -> 'a Uq_engines_compat.engine
method get_opt : unit -> 'a option
method invalidate : unit -> unit
method put : 'a -> unit
end
class ['a] cache :
(Unixqueue.event_system -> 'a Uq_engines_compat.engine) ->
Unixqueue.event_system -> ['a] cache_t
val cache :
(Unixqueue.event_system -> 'a Uq_engines_compat.engine) ->
Unixqueue.event_system -> 'a Uq_engines_compat.cache_t
class ['t] engine_mixin :
't Uq_engines_compat.engine_state ->
Unixqueue.event_system ->
object
method event_system : Unixqueue.event_system
method private notify : unit -> unit
method request_notification : (unit -> bool) -> unit
method request_proxy_notification :
('t Uq_engines_compat.engine -> bool) -> unit
method private set_state : 't Uq_engines_compat.engine_state -> unit
method state : 't Uq_engines_compat.engine_state
end
module Operators :
sig
val ( ++ ) :
'a #Uq_engines_compat.engine ->
('a -> 'b #Uq_engines_compat.engine) -> 'b Uq_engines_compat.engine
val ( >> ) :
'a #Uq_engines_compat.engine ->
('a Uq_engines_compat.final_state -> 'b Uq_engines_compat.final_state) ->
'b Uq_engines_compat.engine
val eps_e :
't Uq_engines_compat.engine_state ->
Unixqueue.event_system -> 't Uq_engines_compat.engine
end
class poll_engine :
?extra_match:(exn -> bool) ->
(Unixqueue.operation * float) list ->
Unixqueue.event_system ->
object
method abort : unit -> unit
method event_system : Unixqueue.event_system
method group : Unixqueue.group
method request_notification : (unit -> bool) -> unit
method request_proxy_notification :
(Unixqueue.event engine -> bool) -> unit
method restart : unit -> unit
method state : Unixqueue.event engine_state
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
method can_output : bool
method close_out : unit -> unit
method flush : unit -> unit
method output : Stdlib.Bytes.t -> int -> int -> int
method pos_out : int
method request_notification : (unit -> bool) -> unit
end
class type async_in_channel =
object
method can_input : bool
method close_in : unit -> unit
method input : Stdlib.Bytes.t -> int -> int -> int
method pos_in : int
method request_notification : (unit -> bool) -> unit
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:#Uq_engines_compat.async_out_channel ->
?close_src:bool ->
?close_dst:bool -> Unixqueue.event_system -> [unit] engine
class sender :
src:#Uq_engines_compat.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
method abort : unit -> unit
method can_output : bool
method close_out : unit -> unit
method event_system : Unixqueue.event_system
method flush : unit -> unit
method output : Bytes.t -> int -> int -> int
method pos_out : int
method request_notification : (unit -> bool) -> unit
method request_proxy_notification : (unit engine -> bool) -> unit
method state : unit engine_state
end
class type async_in_channel_engine =
object
method abort : unit -> unit
method can_input : bool
method close_in : unit -> unit
method event_system : Unixqueue.event_system
method input : Bytes.t -> int -> int -> int
method pos_in : int
method request_notification : (unit -> bool) -> unit
method request_proxy_notification : (unit engine -> bool) -> unit
method state : unit engine_state
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 :
Uq_engines_compat.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 -> Uq_engines_compat.sockspec
val sockspec_of_socksymbol :
Unix.socket_type -> Netsockaddr.socksymbol -> Uq_engines_compat.sockspec
type connect_address =
[ `Command of string * (int -> Unixqueue.event_system -> unit)
| `Socket of
Uq_engines_compat.sockspec * Uq_engines_compat.connect_options
| `W32_pipe of Netsys_win32.pipe_mode * string ]
and connect_options =
Uq_engines.connect_options = {
conn_bind : Uq_engines_compat.sockspec option;
}
val default_connect_options : Uq_engines_compat.connect_options
type connect_status =
[ `Command of Unix.file_descr * int
| `Socket of Unix.file_descr * Uq_engines_compat.sockspec
| `W32_pipe of Unix.file_descr ]
val client_endpoint : Uq_engines_compat.connect_status -> Unix.file_descr
val client_socket : Uq_engines_compat.connect_status -> Unix.file_descr
class type client_endpoint_connector =
object
method connect :
Uq_engines_compat.connect_address ->
Unixqueue.event_system ->
Uq_engines_compat.connect_status Uq_engines_compat.engine
end
class type client_socket_connector = client_endpoint_connector
val connector :
?proxy:#Uq_engines_compat.client_socket_connector ->
Uq_engines_compat.connect_address ->
Unixqueue.event_system ->
Uq_engines_compat.connect_status Uq_engines_compat.engine
type listen_options =
Uq_engines.listen_options = {
lstn_backlog : int;
lstn_reuseaddr : bool;
}
type listen_address =
[ `Socket of
Uq_engines_compat.sockspec * Uq_engines_compat.listen_options
| `W32_pipe of
Netsys_win32.pipe_mode * string * Uq_engines_compat.listen_options
]
val default_listen_options : Uq_engines_compat.listen_options
class type server_endpoint_acceptor =
object
method accept :
unit ->
(Unix.file_descr * Uq_engines_compat.inetspec option)
Uq_engines_compat.engine
method multiple_connections : bool
method server_address : Uq_engines_compat.connect_address
method shut_down : unit -> unit
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
method listen :
Uq_engines_compat.listen_address ->
Unixqueue.event_system ->
Uq_engines_compat.server_endpoint_acceptor Uq_engines_compat.engine
end
class type server_socket_listener = server_endpoint_listener
val listener :
?proxy:#Uq_engines_compat.server_socket_listener ->
Uq_engines_compat.listen_address ->
Unixqueue.event_system ->
Uq_engines_compat.server_socket_acceptor Uq_engines_compat.engine
type datagram_type = [ `Inet6_udp | `Inet_udp | `Unix_dgram ]
class type wrapped_datagram_socket =
object
method datagram_type : Uq_engines_compat.datagram_type
method descriptor : Unix.file_descr
method recvfrom :
Stdlib.Bytes.t ->
int -> int -> Unix.msg_flag list -> int * Uq_engines_compat.sockspec
method sendto :
Stdlib.Bytes.t ->
int -> int -> Unix.msg_flag list -> Uq_engines_compat.sockspec -> int
method shut_down : unit -> unit
method socket_domain : Unix.socket_domain
method socket_protocol : int
method socket_type : Unix.socket_type
end
class type datagram_socket_provider =
object
method create_datagram_socket :
Uq_engines_compat.datagram_type ->
Unixqueue.event_system ->
Uq_engines_compat.wrapped_datagram_socket Uq_engines_compat.engine
end
val datagram_provider :
?proxy:#Uq_engines_compat.datagram_socket_provider ->
Uq_engines_compat.datagram_type ->
Unixqueue.event_system ->
Uq_engines_compat.wrapped_datagram_socket Uq_engines_compat.engine
class type multiplex_controller =
object
method alive : bool
method cancel_reading : unit -> unit
method cancel_shutting_down : unit -> unit
method cancel_writing : unit -> unit
method event_system : Unixqueue.event_system
method inactivate : unit -> unit
method mem_supported : bool
method read_eof : bool
method reading : bool
method shutting_down : bool
method start_mem_reading :
?peek:(unit -> unit) ->
when_done:(exn option -> int -> unit) ->
Netsys_mem.memory -> int -> int -> unit
method start_mem_writing :
when_done:(exn option -> int -> unit) ->
Netsys_mem.memory -> int -> int -> unit
method start_reading :
?peek:(unit -> unit) ->
when_done:(exn option -> int -> unit) ->
Stdlib.Bytes.t -> int -> int -> unit
method start_shutting_down :
?linger:float -> when_done:(exn option -> unit) -> unit -> unit
method start_writing :
when_done:(exn option -> int -> unit) ->
Stdlib.Bytes.t -> int -> int -> unit
method start_writing_eof :
when_done:(exn option -> unit) -> unit -> unit
method supports_half_open_connection : bool
method tls_session : (string * string) option
method tls_session_props : Nettls_support.tls_session_props option
method tls_stashed_endpoint : unit -> exn
method writing : bool
method wrote_eof : bool
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 -> Uq_engines_compat.multiplex_controller
class type datagram_multiplex_controller =
object
method alive : bool
method cancel_reading : unit -> unit
method cancel_shutting_down : unit -> unit
method cancel_writing : unit -> unit
method event_system : Unixqueue.event_system
method inactivate : unit -> unit
method mem_supported : bool
method read_eof : bool
method reading : bool
method received_from : Unix.sockaddr
method send_to : Unix.sockaddr -> unit
method shutting_down : bool
method start_mem_reading :
?peek:(unit -> unit) ->
when_done:(exn option -> int -> unit) ->
Netsys_mem.memory -> int -> int -> unit
method start_mem_writing :
when_done:(exn option -> int -> unit) ->
Netsys_mem.memory -> int -> int -> unit
method start_reading :
?peek:(unit -> unit) ->
when_done:(exn option -> int -> unit) ->
Bytes.t -> int -> int -> unit
method start_shutting_down :
?linger:float -> when_done:(exn option -> unit) -> unit -> unit
method start_writing :
when_done:(exn option -> int -> unit) ->
Bytes.t -> int -> int -> unit
method start_writing_eof :
when_done:(exn option -> unit) -> unit -> unit
method supports_half_open_connection : bool
method tls_session : (string * string) option
method tls_session_props : Nettls_support.tls_session_props option
method tls_stashed_endpoint : unit -> exn
method writing : bool
method wrote_eof : bool
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 ->
Uq_engines_compat.datagram_multiplex_controller
type onshutdown_out_spec =
[ `Action of
Uq_engines_compat.async_out_channel_engine ->
Uq_engines_compat.multiplex_controller ->
unit Uq_engines_compat.engine_state -> unit
| `Ignore
| `Initiate_shutdown ]
type onshutdown_in_spec =
[ `Action of
Uq_engines_compat.async_in_channel_engine ->
Uq_engines_compat.multiplex_controller ->
unit Uq_engines_compat.engine_state -> unit
| `Ignore
| `Initiate_shutdown ]
class output_async_mplex :
?onclose:[ `Ignore | `Write_eof ] ->
?onshutdown:Uq_engines_compat.onshutdown_out_spec ->
?buffer_size:int ->
Uq_engines_compat.multiplex_controller -> async_out_channel_engine
class input_async_mplex :
?onshutdown:Uq_engines_compat.onshutdown_in_spec ->
?buffer_size:int ->
Uq_engines_compat.multiplex_controller -> async_in_channel_engine
module Debug : sig val enable : bool Stdlib.ref end
end`