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.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 state : 't Uq_engines.engine_state
end
class ['t] delegate_engine : 't #Uq_engines.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.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 signal : 'a Uq_engines.final_state -> unit
method state : 'a engine_state
end
val signal_engine :
Unixqueue.event_system ->
'a Uq_engines.engine * ('a Uq_engines.final_state -> unit)
class ['a, 'b] map_engine :
map_done:('a -> 'b Uq_engines.engine_state) ->
?map_error:(exn -> 'b Uq_engines.engine_state) ->
?map_aborted:(unit -> 'b Uq_engines.engine_state) ->
?propagate_working:bool -> 'a #Uq_engines.engine -> ['b] engine
val map_engine :
map_done:('a -> 'b Uq_engines.engine_state) ->
?map_error:(exn -> 'b Uq_engines.engine_state) ->
?map_aborted:(unit -> 'b Uq_engines.engine_state) ->
?propagate_working:bool -> 'a #Uq_engines.engine -> 'b Uq_engines.engine
class ['a, 'b] fmap_engine :
'a #Uq_engines.engine ->
('a Uq_engines.final_state -> 'b Uq_engines.final_state) -> ['b] engine
val fmap_engine :
'a #Uq_engines.engine ->
('a Uq_engines.final_state -> 'b Uq_engines.final_state) ->
'b Uq_engines.engine
class ['a] meta_engine :
'a #Uq_engines.engine -> ['a Uq_engines.final_state] engine
val meta_engine :
'a #Uq_engines.engine -> 'a Uq_engines.final_state Uq_engines.engine
class ['t] epsilon_engine :
't Uq_engines.engine_state -> Unixqueue.event_system -> ['t] engine
val epsilon_engine :
't Uq_engines.engine_state ->
Unixqueue.event_system -> 't Uq_engines.engine
class ['a, 'b] seq_engine :
'a #Uq_engines.engine -> ('a -> 'b #Uq_engines.engine) -> ['b] engine
val seq_engine :
'a #Uq_engines.engine ->
('a -> 'b #Uq_engines.engine) -> 'b Uq_engines.engine
class ['a, 'b] qseq_engine :
'a #Uq_engines.engine -> ('a -> 'b #Uq_engines.engine) -> ['b] engine
val qseq_engine :
'a #Uq_engines.engine ->
('a -> 'b #Uq_engines.engine) -> 'b Uq_engines.engine
class ['a] stream_seq_engine :
'a ->
('a -> 'a #Uq_engines.engine) Stream.t ->
Unixqueue.event_system -> ['a] engine
val stream_seq_engine :
'a ->
('a -> 'a #Uq_engines.engine) Stream.t ->
Unixqueue.event_system -> 'a Uq_engines.engine
class ['a, 'b] sync_engine :
'a #Uq_engines.engine -> 'b #Uq_engines.engine -> ['a * 'b] engine
val sync_engine :
'a #Uq_engines.engine ->
'b #Uq_engines.engine -> ('a * 'b) Uq_engines.engine
class ['a, 'b] msync_engine :
'a #Uq_engines.engine list ->
('a -> 'b -> 'b) -> 'b -> Unixqueue.event_system -> ['b] engine
val msync_engine :
'a #Uq_engines.engine list ->
('a -> 'b -> 'b) -> 'b -> Unixqueue.event_system -> 'b Uq_engines.engine
class ['a] delay_engine :
float ->
(unit -> 'a #Uq_engines.engine) -> Unixqueue.event_system -> ['a] engine
val delay_engine :
float ->
(unit -> 'a #Uq_engines.engine) ->
Unixqueue.event_system -> 'a Uq_engines.engine
class ['a] timeout_engine :
float -> exn -> 'a Uq_engines.engine -> ['a] engine
val timeout_engine :
float -> exn -> 'a Uq_engines.engine -> 'a Uq_engines.engine
class watchdog : float -> 'a #Uq_engines.engine -> [unit] engine
val watchdog : float -> 'a #Uq_engines.engine -> unit Uq_engines.engine
class type ['a] serializer_t =
object
method serialized :
(Unixqueue.event_system -> 'a Uq_engines.engine) ->
'a Uq_engines.engine
end
class ['a] serializer : Unixqueue.event_system -> ['a] serializer_t
val serializer : Unixqueue.event_system -> 'a Uq_engines.serializer_t
class type ['a] prioritizer_t =
object
method prioritized :
(Unixqueue.event_system -> 'a Uq_engines.engine) ->
int -> 'a Uq_engines.engine
end
class ['a] prioritizer : Unixqueue.event_system -> ['a] prioritizer_t
val prioritizer : Unixqueue.event_system -> 'a Uq_engines.prioritizer_t
class type ['a] cache_t =
object
method abort : unit -> unit
method get_engine : unit -> 'a Uq_engines.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.engine) ->
Unixqueue.event_system -> ['a] cache_t
val cache :
(Unixqueue.event_system -> 'a Uq_engines.engine) ->
Unixqueue.event_system -> 'a Uq_engines.cache_t
class ['t] engine_mixin :
't Uq_engines.engine_state ->
Unixqueue.event_system ->
object
method event_system : Unixqueue.event_system
method private notify : unit -> unit
method request_notification : (unit -> bool) -> unit
method private set_state : 't Uq_engines.engine_state -> unit
method state : 't Uq_engines.engine_state
end
module Operators :
sig
val ( ++ ) :
'a #Uq_engines.engine ->
('a -> 'b #Uq_engines.engine) -> 'b Uq_engines.engine
val ( >> ) :
'a #Uq_engines.engine ->
('a Uq_engines.final_state -> 'b Uq_engines.final_state) ->
'b Uq_engines.engine
val eps_e :
't Uq_engines.engine_state ->
Unixqueue.event_system -> 't Uq_engines.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 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 : string -> 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 : string -> 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.async_out_channel ->
?close_src:bool ->
?close_dst:bool -> Unixqueue.event_system -> [unit] engine
class sender :
src:#Uq_engines.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 : string -> int -> int -> int
method pos_out : int
method request_notification : (unit -> 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 : string -> int -> int -> int
method pos_in : int
method request_notification : (unit -> 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.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.sockspec
val sockspec_of_socksymbol :
Unix.socket_type -> Netsockaddr.socksymbol -> Uq_engines.sockspec
type connect_address =
[ `Command of string * (int -> Unixqueue.event_system -> unit)
| `Socket of Uq_engines.sockspec * Uq_engines.connect_options
| `W32_pipe of Netsys_win32.pipe_mode * string ]
and connect_options = { conn_bind : Uq_engines.sockspec option; }
val default_connect_options : Uq_engines.connect_options
type connect_status =
[ `Command of Unix.file_descr * int
| `Socket of Unix.file_descr * Uq_engines.sockspec
| `W32_pipe of Unix.file_descr ]
val client_endpoint : Uq_engines.connect_status -> Unix.file_descr
val client_socket : Uq_engines.connect_status -> Unix.file_descr
class type client_endpoint_connector =
object
method connect :
Uq_engines.connect_address ->
Unixqueue.event_system -> Uq_engines.connect_status Uq_engines.engine
end
class type client_socket_connector = client_endpoint_connector
val connector :
?proxy:#Uq_engines.client_socket_connector ->
Uq_engines.connect_address ->
Unixqueue.event_system -> Uq_engines.connect_status Uq_engines.engine
type listen_address =
[ `Socket of Uq_engines.sockspec * Uq_engines.listen_options
| `W32_pipe of
Netsys_win32.pipe_mode * string * Uq_engines.listen_options ]
and listen_options = { lstn_backlog : int; lstn_reuseaddr : bool; }
val default_listen_options : Uq_engines.listen_options
class type server_endpoint_acceptor =
object
method accept :
unit ->
(Unix.file_descr * Uq_engines.inetspec option) Uq_engines.engine
method multiple_connections : bool
method server_address : Uq_engines.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.listen_address ->
Unixqueue.event_system ->
Uq_engines.server_endpoint_acceptor Uq_engines.engine
end
class type server_socket_listener = server_endpoint_listener
val listener :
?proxy:#Uq_engines.server_socket_listener ->
Uq_engines.listen_address ->
Unixqueue.event_system ->
Uq_engines.server_socket_acceptor Uq_engines.engine
type datagram_type = [ `Inet6_udp | `Inet_udp | `Unix_dgram ]
class type wrapped_datagram_socket =
object
method datagram_type : Uq_engines.datagram_type
method descriptor : Unix.file_descr
method recvfrom :
string ->
int -> int -> Unix.msg_flag list -> int * Uq_engines.sockspec
method sendto :
string ->
int -> int -> Unix.msg_flag list -> Uq_engines.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.datagram_type ->
Unixqueue.event_system ->
Uq_engines.wrapped_datagram_socket Uq_engines.engine
end
val datagram_provider :
?proxy:#Uq_engines.datagram_socket_provider ->
Uq_engines.datagram_type ->
Unixqueue.event_system ->
Uq_engines.wrapped_datagram_socket Uq_engines.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) -> string -> 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) -> string -> int -> int -> unit
method start_writing_eof :
when_done:(exn option -> unit) -> unit -> unit
method supports_half_open_connection : bool
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.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) -> string -> 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) -> string -> int -> int -> unit
method start_writing_eof :
when_done:(exn option -> unit) -> unit -> unit
method supports_half_open_connection : bool
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.datagram_multiplex_controller
type onshutdown_out_spec =
[ `Action of
Uq_engines.async_out_channel_engine ->
Uq_engines.multiplex_controller ->
unit Uq_engines.engine_state -> unit
| `Ignore
| `Initiate_shutdown ]
type onshutdown_in_spec =
[ `Action of
Uq_engines.async_in_channel_engine ->
Uq_engines.multiplex_controller ->
unit Uq_engines.engine_state -> unit
| `Ignore
| `Initiate_shutdown ]
class output_async_mplex :
?onclose:[ `Ignore | `Write_eof ] ->
?onshutdown:Uq_engines.onshutdown_out_spec ->
?buffer_size:int ->
Uq_engines.multiplex_controller -> async_out_channel_engine
class input_async_mplex :
?onshutdown:Uq_engines.onshutdown_in_spec ->
?buffer_size:int ->
Uq_engines.multiplex_controller -> async_in_channel_engine
module Debug : sig val enable : bool Pervasives.ref end
end