Purpose

Pipe handles provide an abstraction over local domain sockets on Unix and named pipes on Windows.

new_pipe

uv.new_pipe()

Initialize the handle.

Parameters

none

Examples

local pipe_handle = uv.new_pipe()

pipe_open

uv.pipe_open( fd_or_handle )

Open an existing file descriptor or HANDLE as a pipe.

Parameters

Name Details
fd_or_handle The handle of file descriptor.

Examples

uv.pipe_open( fd_or_handle )

pipe_bind

uv.pipe_bind( pipe_handle, filepath )

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

Parameters

Name Details
pipe_handle The handle to the pipe.
filepath A file to bind to the pipe.

Examples

uv.pipe_bind( pipe_handle, '/home/somefile' )

pipe_connect

uv.pipe_connect( connect_req, pipe_handle, name, connect_cb )

Connect to the Unix domain socket or the named pipe.

Parameters

Name Details
connect_req The connection request.
pipe_handle The handle to the pipe.
name Name of the pipe.
connect_cb The callback to fire on connection.

Examples

none


pipe_getsockname

uv.pipe_getsockname( pipe_handle )

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

Parameters

Name Details
pipe_handle The handle to the pipe.

Examples

local sock_name = uv.pipe_getsockname( pipe_handle )

pipe_getpeername

uv.pipe_getpeername( pipe_handle )

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

Parameters

none

Examples

local peer_name = uv.pipe_getpeername( pipe_handle )

pipe_pending_instances

uv.pipe_pending_instances( pipe_handle, count )

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

This setting applies to Windows only.

Parameters

Name Details
pipe_handle The handle to the pipe.
count The pending pipe instance amount.

Examples

uv.pipe_pending_instances( pipe_handle, 4 )

pipe_pending_count

uv.pipe_pending_count( pipe_handle )

Pipe pending count.

Parameters

Name Details
pipe_handle The handle to the pipe.

Examples

local amount = uv.pipe_pending_count( pipe_handle )

pipe_pending_type

uv.pipe_pending_type( pipe_handle )

Used to receive handles over IPC pipes.

Parameters

Name Details
pipe_handle The handle to the pipe.

Examples

local handle_type = uv.pipe_pending_type( pipe_handle )

See also

The following API functionality applies to all handles and streams:

handles streams