Next: , Previous: , Up: Client connections   [Contents][Index]


5.2.7.2 Pipe connections

The pipe implementation supports both named and anonymous pipes. Pipe servers are implemented as listeners on a file system FIFO on Unices or “Named Pipes” on Windows (can be shared over a Windows network).

A FIFO special file is similar to a pipe, except that it is created in a different way. Instead of being an anonymous communications channel, a FIFO special file is entered into the file system.

Once you have created a FIFO special file in this way, any process can open it for reading or writing, in the same way as an ordinary file. However, it has to be open at both ends simultaneously before you can proceed to do any input or output operations on it.

Function: svz_socket_t * svz_pipe_create (svz_t_handle recv_fd, svz_t_handle send_fd)

Create a socket structure containing both the pipe descriptors recv_fd and send_fd. Return NULL on errors.

Function: int svz_pipe_create_pair (svz_t_handle pipe_desc[2])

Create a (non blocking) pair of pipes. This differs in Win32 and Unices. Return a non-zero value on errors.

Function: svz_socket_t * svz_pipe_connect (svz_pipe_t *recv, svz_pipe_t *send)

Create a pipe connection socket structure to the pair of named pipes recv and send. Return NULL on errors.

Function: int svz_invalid_handle_p (svz_t_handle handle)

Return 1 if handle is invalid, otherwise 0.

Function: void svz_invalidate_handle (svz_t_handle *href)

Invalidate the handle pointed at by href.

Function: int svz_closehandle (svz_t_handle handle)

Close handle. Return 0 if successful, -1 otherwise.


Next: UDP sockets, Previous: TCP sockets, Up: Client connections   [Contents][Index]