mirror of
https://github.com/c-cube/nanoev.git
synced 2025-12-06 11:15:48 -05:00
format
This commit is contained in:
parent
295b3b5c24
commit
8de6936787
1 changed files with 12 additions and 8 deletions
|
|
@ -4,29 +4,33 @@ val setup_bg_thread : Nanoev.t -> unit
|
||||||
(** Install this event loop in a background thread *)
|
(** Install this event loop in a background thread *)
|
||||||
|
|
||||||
val has_bg_thread : unit -> bool
|
val has_bg_thread : unit -> bool
|
||||||
(** [has_bg_thread ()] is [true] iff a background thread is running a nanoev loop *)
|
(** [has_bg_thread ()] is [true] iff a background thread is running a nanoev
|
||||||
|
loop *)
|
||||||
|
|
||||||
(** {2 Non blocking IO primitives} *)
|
(** {2 Non blocking IO primitives} *)
|
||||||
|
|
||||||
val read : Unix.file_descr -> bytes -> int -> int -> int
|
val read : Unix.file_descr -> bytes -> int -> int -> int
|
||||||
(** Read from the non blocking FD.
|
(** Read from the non blocking FD.
|
||||||
@raise Nanoev.Closed if the FD is closed
|
@raise Nanoev.Closed if the FD is closed
|
||||||
@raise Unix.Unix_error for other errors *)
|
@raise Unix.Unix_error for other errors *)
|
||||||
|
|
||||||
val write : Unix.file_descr -> bytes -> int -> int -> int
|
val write : Unix.file_descr -> bytes -> int -> int -> int
|
||||||
(** Write into the non blocking FD.
|
(** Write into the non blocking FD.
|
||||||
@raise Nanoev.Closed if the FD is closed
|
@raise Nanoev.Closed if the FD is closed
|
||||||
@raise Unix.Unix_error for other errors *)
|
@raise Unix.Unix_error for other errors *)
|
||||||
|
|
||||||
val close : Unix.file_descr -> unit
|
val close : Unix.file_descr -> unit
|
||||||
(** Close the file descriptor
|
(** Close the file descriptor
|
||||||
@raise Unix.Unix_error when it fails *)
|
@raise Unix.Unix_error when it fails *)
|
||||||
|
|
||||||
val connect : Unix.file_descr -> Unix.sockaddr -> unit
|
val connect : Unix.file_descr -> Unix.sockaddr -> unit
|
||||||
|
(** Connect this FD to the remote address.
|
||||||
|
@raise Nanoev.Closed if the FD is closed.
|
||||||
|
@raise Unix.Unix_error for other errors *)
|
||||||
|
|
||||||
val accept : Unix.file_descr -> Unix.file_descr * Unix.sockaddr
|
val accept : Unix.file_descr -> Unix.file_descr * Unix.sockaddr
|
||||||
(** Accept a connection on this fd.
|
(** Accept a connection on this fd.
|
||||||
@raise Nanoev.Closed if the FD is closed.
|
@raise Nanoev.Closed if the FD is closed.
|
||||||
@raise Unix.Unix_error for other errors *)
|
@raise Unix.Unix_error for other errors *)
|
||||||
|
|
||||||
val sleep : float -> unit
|
val sleep : float -> unit
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue