Provided by: liblibrecast-dev_0.9.1-1_amd64 bug

NAME

       lc_socketpair - create a pair of connected Librecast sockets

LIBRARY

       Librecast library (liblibrecast, -llibrecast)

SYNOPSIS

       #include <librecast/net.h>

       int lc_socketpair(lc_ctx_t *ctx, lc_socket_t *sock[2]);

       Compile and link with -llibrecast.

DESCRIPTION

       lc_socketpair() creates a pair of connected Librecast sockets.

       Call lc_socket_close(3) when done.

       Sockets  can  also  be  freed  by  a  call to lc_ctx_free(3) on the Librecast context which will free the
       context and all associated sockets and channels.

RETURN VALUE

       On success, zero is returned. On error, -1 is returned, errno is set to indicate the  error.

ERRORS

       lc_socketpair() can fail with the following errors:

       ENOMEM Out of memory.  Possibly, the application hit the RLIMIT_AS  or  RLIMIT_DATA  limit  described  in
              getrlimit(2).

       lc_socketpair() can also fail with any of the errors described in socketpair(2).

SEE ALSO

       lc_socket_new(3),   lc_channel_new(3),   lc_ctx_new(3),  lc_socket_setopt(3),  setsockopt(2),  socket(2),
       socketpair(2)

LIBRECAST                                          2024-04-08                                   LC_SOCKETPAIR(3)