.TH LC_CTX_RATELIMIT 3 2023-07-23 "LIBRECAST" "Librecast Programmer's Manual" .SH NAME lc_ctx_ratelimit, lc_channel_ratelimit \- set send/recv ratelimits .SH LIBRARY Librecast library .RI ( liblibrecast ", " \-llibrecast ) .SH SYNOPSIS .nf .B #include .PP .BI "void lc_ctx_ratelimit(lc_ctx_t " *ctx ", size_t " bps_out ", size_t " bps_in ");" .BI "void lc_channel_ratelimit(lc_channel_t " *chan ", size_t " bps_out ", size_t " bps_in ");" .fi .PP Compile and link with \fI\-llibrecast\fP. .SH DESCRIPTION The .BR lc_ctx_ratelimit function sets the default ratelimits for subsequent sockets and channels created with context .IR ctx . .PP .IR bps_out and .IR bps_in specify the ratelimits in bits per second for outbound (send) and inbound (recv) respectively. These limits are applied to future sockets and channels created with .BR lc_socket_new (3) and .BR lc_channel_new (3). Existing sockets and channels are unaffected. .PP .BR lc_channel_ratelimit (3) sets the rate limits for channel .IR chan similarly. .PP .SH RETURN VALUE These functions return no value. .SH ERRORS None. .SH NOTES Only the send limit is enforced at this time. .SH SEE ALSO .BR lc_ctx_new (3), .BR lc_ctx_free (3), .BR lc_socket_new (3), .BR lc_channel_new (3), .BR lc_channel_ratelimit (3)