Provided by: liblibrecast-dev_0.5.1-4_amd64 bug

NAME

       lc_socket_new, lc_socket_close - create and free Librecast sockets

SYNOPSIS

       #include <librecast/net.h>

       lc_socket_t *lc_socket_new(lc_ctx_t *ctx);
       void lc_socket_close(lc_socket_t *sock);

       Compile and link with -llibrecast.

DESCRIPTION

       lc_socket_new() creates a new Librecast socket.  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.

       lc_socket_free() closes and frees a Librecast socket created with lc_socket_new(3)

RETURN VALUE

       lc_socket_new() returns a pointer to a lc_socket_t handle.  On error returns NULL and sets
       errno.

       The lc_socket_close() function returns no value.

ERRORS

       lc_socket_new() 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_socket_new()  could  also  fail  with  any  of  the  errors  listed  in  socket(2)   or
       setsockopt(2).

SEE ALSO

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