sig
exception Closed_channel
exception Broken_communication
exception Watchdog_timeout
exception Addressing_method_not_supported
exception Cancelled
type 'a engine_state =
[ `Aborted | `Done of 'a | `Error of exn | `Working of int ]
class type ['a] engine =
object
method abort : unit -> unit
method event_system : Unixqueue.event_system
method request_notification : (unit -> bool) -> unit
method state : 'a Uq_engines.engine_state
end
val when_state :
?is_done:('a -> unit) ->
?is_error:(exn -> unit) ->
?is_aborted:(unit -> unit) -> 'a #Uq_engines.engine -> 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) ->
'a #Uq_engines.engine -> ['b] engine
class ['a] epsilon_engine :
'a Uq_engines.engine_state -> Unixqueue.event_system -> ['a] engine
class ['a, 'b] seq_engine :
'a #Uq_engines.engine -> ('a -> 'b #Uq_engines.engine) -> ['b] engine
class ['a, 'b] sync_engine :
'a #Uq_engines.engine -> 'b #Uq_engines.engine -> ['a * 'b] engine
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 poll_process_engine :
?period:float ->
pid:int -> Unixqueue.event_system -> [Unix.process_status] engine
class watchdog : float -> 'a #Uq_engines.engine -> [unit] engine
class ['a] engine_mixin :
'a Uq_engines.engine_state ->
object
method private notify : unit -> unit
method request_notification : (unit -> bool) -> unit
method private set_state : 'a Uq_engines.engine_state -> unit
method state : 'a Uq_engines.engine_state
end
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 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 ]
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
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 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
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 connector :
?proxy:#Uq_engines.client_socket_connector ->
Uq_engines.connect_address ->
Unixqueue.event_system -> Uq_engines.connect_status Uq_engines.engine
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 ->
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) ->
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