LC_CTX_NEW(3)

NAME
lc_ctx_new, lc_ctx_free - create and free Librecast contexts

LIBRARY
Librecast library (liblibrecast, -llibrecast)

SYNOPSIS
#include <librecast/net.h>

lc_ctx_t *lc_ctx_new(void);
void lc_ctx_free(lc_ctx_t *ctx);

Compile and link with -llibrecast.

DESCRIPTION
lc_ctx_new() creates a new Librecast context and sets up the environment. Call lc_ctx_free(3) when done.

lc_ctx_free() invalidates and frees a Librecast context created with lc_ctx_new(3)

RETURN VALUE
lc_ctx_new() returns a pointer to a lc_ctx_t handle. On error returns NULL and sets errno to ENOMEM.

The lc_ctx_free() function returns no value.

ERRORS
lc_ctx_new() can fail with the following error:

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

EXAMPLE

  Program source
    lc_ctx_t *lctx;
    lctx = lc_ctx_new();

    /* your Librecast program here */

    lc_ctx_free(lctx); /* free context when done */

SEE ALSO
lc_ctx_free(3)