Home Explore Blog CI



neovim

27th chunk of `runtime/doc/luvref.txt`
bdab1f7bb7511faebf5c15ac438575ac9daf9203515acd030000000100000fa2
               Returns: `0` or `fail`

                Note: The file descriptor is set to non-blocking mode.

uv.pipe_bind({pipe}, {name})                                    *uv.pipe_bind()*

                > method form `pipe:bind(name)`

                Parameters:
                - `pipe`: `uv_pipe_t userdata`
                - `name`: `string`

                Bind the pipe to a file path (Unix) or a name (Windows).

                Returns: `0` or `fail`

                Note: Paths on Unix get truncated to
                sizeof(sockaddr_un.sun_path) bytes, typically between 92 and
                108 bytes.

uv.pipe_connect({pipe}, {name} [, {callback}])               *uv.pipe_connect()*

                > method form `pipe:connect(name, [callback])`

                Parameters:
                - `pipe`: `uv_pipe_t userdata`
                - `name`: `string`
                - `callback`: `callable` or `nil`
                  - `err`: `nil` or `string`

                Connect to the Unix domain socket or the named pipe.

                Returns: `uv_connect_t userdata` or `fail`

                Note: Paths on Unix get truncated to
                sizeof(sockaddr_un.sun_path) bytes, typically between 92 and
                108 bytes.

uv.pipe_getsockname({pipe})                              *uv.pipe_getsockname()*

                > method form `pipe:getsockname()`

                Parameters:
                - `pipe`: `uv_pipe_t userdata`

                Get the name of the Unix domain socket or the named pipe.

                Returns: `string` or `fail`

uv.pipe_getpeername({pipe})                              *uv.pipe_getpeername()*

                > method form `pipe:getpeername()`

                Parameters:
                - `pipe`: `uv_pipe_t userdata`

                Get the name of the Unix domain socket or the named pipe to
                which the handle is connected.

                Returns: `string` or `fail`

uv.pipe_pending_instances({pipe}, {count})         *uv.pipe_pending_instances()*

                > method form `pipe:pending_instances(count)`

                Parameters:
                - `pipe`: `uv_pipe_t userdata`
                - `count`: `integer`

                Set the number of pending pipe instance handles when the pipe
                server is waiting for connections.

                Returns: Nothing.

                Note: This setting applies to Windows only.

uv.pipe_pending_count({pipe})                          *uv.pipe_pending_count()*

                > method form `pipe:pending_count()`

                Parameters:
                - `pipe`: `uv_pipe_t userdata`

                Returns the pending pipe count for the named pipe.

                Returns: `integer`

uv.pipe_pending_type({pipe})                            *uv.pipe_pending_type()*

                > method form `pipe:pending_type()`

                Parameters:
                - `pipe`: `uv_pipe_t userdata`

                Used to receive handles over IPC pipes.

                First - call |uv.pipe_pending_count()|, if it's > 0 then
                initialize a handle of the given type, returned by
                `uv.pipe_pending_type()` and call `uv.accept(pipe, handle)` .

                Returns: `string`

uv.pipe_chmod({pipe}, {flags})                                 *uv.pipe_chmod()*

                > method form `pipe:chmod(flags)`

                Parameters:
                - `pipe`: `uv_pipe_t userdata`
                - `flags`: `string`

                Alters pipe permissions, allowing it to be accessed from
                processes run by different users. Makes the pipe writable or
                readable by all users. `flags` are: `"r"`, `"w"`, `"rw"`, or
                `"wr"` where `r` is `READABLE` and `w` is `WRITABLE`. This
                function is blocking.

                Returns: `0` or `fail`

uv.pipe({read_flags}, {write_flags})                                 *uv.pipe()*

Title: Libuv Pipe Operations: Connecting, Getting Names, and Managing Pending Instances
Summary
This section details several Libuv pipe operations, including connecting to a pipe, retrieving socket and peer names, setting and retrieving the number of pending pipe instances (Windows only), getting the pending type for IPC pipes, altering pipe permissions with `uv.pipe_chmod()`, and potentially introduces a `uv.pipe()` function with read/write flags.