P_net_local_socket 3porty 2011-04-13 libporty manual

NAME

P_net_local_socket

SYNPOSIS

#include <libporty/net/local.h>

int P_net_local_socket (P_net_socket * sockfd1 , P_net_socket *sockfd2 , P_net_nonblock_t non_blocking );

Link with -lporty_net

DESCRIPTION

Creates an interconnected local socket pair, using socketpair(2) on systems supporting that (UNIX), or using local TCP connection for other systems (win32). The two sockets are returned in sockfd1 and sockfd2 . Non-blocking property of both of them are set as directed by non_blocking .

Note: because on some systems libporty will use a local TCP connection, blocking operation may take quiet some time.

RETURN VALUE

Returns 0 on success or an error code from P_net_err n failure.

P_net_local_socket 3porty 2011-04-13 libporty manual