package luv
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=35d8092d7a7e8d00a7ab8caf79d99e2073baf1999f5b9274de4d69078ad83685
md5=fb78fd1b179f5c9585e79b5a1c5ff644
doc/luv/Luv/Pipe/index.html
Module Luv.PipeSource
Pipes.
See Child process I/O and IPC in the user guide, and uv_pipe_t — Pipe handle in libuv.
Binds uv_pipe_t.
Note that values of this type can also be used with functions in:
In particular, see Luv.Handle.close, Luv.Stream.accept, Luv.Stream.read_start, Luv.Stream.write.
Allocates and initializes a pipe.
Binds uv_pipe_init.
The pipe is not yet connected to anything at this point. See Luv.Pipe.bind, Luv.Stream.listen, and Luv.Pipe.connect.
Wraps an existing file descriptor in a libuv pipe.
Binds uv_pipe_open.
Assigns a pipe a name or an address.
Binds uv_pipe_bind. See bind(3p).
Connects to the pipe at the given name or address.
Binds uv_pipe_connect. See connect(3p).
Retrieves the name or address assigned to the given pipe.
Binds uv_pipe_getsockname. See getsockname(3p).
Retrieves the name or address of the given pipe's peer.
Binds uv_pipe_getpeername. See getpeername(3p).
Binds uv_pipe_pending_instances.
val receive_handle :
t ->
[ `TCP of TCP.t -> (unit, Error.t) Result.result
| `Pipe of t -> (unit, Error.t) Result.result
| `None ]Receives a file descriptor over the given pipe.
File descriptors are sent using the ~send_handle argument of Luv.Stream.write2.
On the receiving end, call Luv.Stream.read_start. When that function calls its callback, there may be file descriptors in the pipe, in addition to the ordinary data provided to the callback.
To check, call this function Luv.Pipe.recieve_handle in a loop until it returns `None. Each time it returns `TCP receive or `Pipe receive, create an appropriate handle using either Luv.TCP.init or Luv.Pipe.init, and call receive handle to receive the file descriptor and associate it with handle.
Constants for Luv.Pipe.chmod.
Sets pipe permissions.
Binds uv_pipe_chmod.