logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

lc_socket_new, lc_socket_close - create and free Librecast sockets

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)

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).

Library

       Librecast library (liblibrecast, -llibrecast)

Name

       lc_socket_new, lc_socket_close - create and free Librecast sockets

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.

See Also

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

LIBRECAST                                          2021-02-21                                   LC_SOCKET_NEW(3)

Synopsis

#include<librecast/net.h>lc_socket_t*lc_socket_new(lc_ctx_t*ctx);voidlc_socket_close(lc_socket_t*sock);

       Compile and link with -llibrecast.

return

See Also