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_ctx_coding_set, lc_channel_coding_set - set Librecast channel encoding options

Description

lc_ctx_coding_set() sets the default encoding options for sockets and channels subsequently created using
       context ctx.

       lc_channel_coding_set()  sets  encoding  options  for  a Librecast channel, chan, overriding any defaults
       inherited from the parent Librecast context.

       chan is a pointer to a Librecast channel.

       The coding argument can include the bitwise OR of any of the following coding options:

       LC_CODE_SYMM
              Enable symmetric key encryption. Requires that a symmetric key has been assigned  to  the  Channel
              with lc_channel_set_sym_key(3)LC_CODE_FEC_RQ
              Enables RaptorQ Forwards Error Correction (FEC).  Calling lc_channel_send(3) as normal encodes the
              data  to  be  sent.   Subsequent  calls  to  lc_channel_send() with buf == NULL will send the next
              symbol/packet.  To receive, call lc_channel_coding_set(chan,LC_CODE_FEC_RQ) on the receiver  and
              then  lc_channel_recv().   Encodings  are  per  channel, not per socket, so it is necessary to use
              lc_channel_recv(), not lc_socket_recv(3).LC_CODE_FEC_RAND
              Requires LC_CODE_FEC_RQ.  Use random symbols instead of sequential ESIs.

Errors

       None.

Library

       Librecast library (liblibrecast, -llibrecast)

Name

       lc_ctx_coding_set, lc_channel_coding_set - set Librecast channel encoding options

Return Value

       Returns the current value of the channel coding options.

See Also

lc_channel_new(3),  lc_channel_close(3),  lc_channel_send(3),  lc_channel_set_sym_key(3),  lc_ctx_new(3),
       lc_socket_setopt(3), lc_socket_recv(3)

LIBRECAST                                          2023-07-31                           LC_CHANNEL_CODING_SET(3)

Synopsis

#include<librecast/net.h>intlc_ctx_coding_set(lc_ctx_t*ctx,intcoding);intlc_channel_coding_set(lc_channel_t*chan,intcoding);

       Compile and link with -llibrecast.

See Also