Skip to content

Commit f30025c

Browse files
committed
Expose Eio_luv.Low_level.Stream.write
1 parent d24af9a commit f30025c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lib_eio_luv/eio_luv.mli

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,18 @@ module Low_level : sig
131131
@param sw The handle is closed when [sw] is released, if not closed manually first.
132132
@param close_unix if [true] (the default), calling [close] also closes [fd]. *)
133133
end
134+
135+
module Stream : sig
136+
type 'a t = [`Stream of 'a] Handle.t
137+
138+
val read_into : [< `Pipe | `TCP | `TTY ] t -> Luv.Buffer.t -> int
139+
(** [read_into handle buf] reads some bytes from [handle] into [buf] returning the number
140+
of bytes read.
141+
@raise End_of_file if there is no more data to read *)
142+
143+
val write : [ `Stream of [< `Pipe | `TCP | `TTY ] ] Handle.t -> Luv.Buffer.t list -> unit
144+
(** [write handle bufs] writes the contents of [bufs] to [handle]. *)
145+
end
134146
end
135147

136148
(** {1 Eio API} *)

0 commit comments

Comments
 (0)