.TH LC_CHANNEL_CODING_SET 3 2022-07-06 "LIBRECAST" "Librecast Programmer's Manual" .SH NAME lc_channel_coding_set - set Librecast channel encoding options .SH SYNOPSIS .nf .B #include .PP .BI "int lc_channel_coding_set(lc_channel_t *" chan ", int " coding ");" .fi .PP Compile and link with \fI\-llibrecast\fP. .SH DESCRIPTION .BR lc_channel_coding_set () sets encoding options for a Librecast channel. .I chan is a pointer to a Librecast channel. .PP The .I coding argument can include the bitwise OR of any of the following coding options: .TP .B LC_CODE_SYMM Enable symmetric key encryption. Requires that a symmetric key has been assigned to the Channel with .I lc_channel_set_sym_key(3) .TP .B LC_CODE_FEC_RQ Enables RaptorQ Forwards Error Correction (FEC). Calling .I lc_channel_send(3) as normal encodes the data to be sent. Subsequent calls to .I lc_channel_send() with .I buf == NULL will send the next symbol/packet. To receive, call .I lc_channel_coding_set (chan, LC_CODE_FEC_RQ) on the receiver and then .I lc_channel_recv(). Encodings are per channel, not per socket, so it is necessary to use .I lc_channel_recv(), not .I lc_socket_recv(3). .TP .B LC_CODE_FEC_RAND Requires .B LC_CODE_FEC_RQ. Use random symbols instead of sequential ESIs. .SH RETURN VALUE Returns the current value of the channel coding options. .SH ERRORS None. .SH SEE ALSO .BR lc_channel_new (3), .BR lc_channel_close (3), .BR lc_channel_send (3), .BR lc_channel_set_sym_key (3), .BR lc_ctx_new (3), .BR lc_socket_setopt (3), .BR lc_socket_recv (3)