table of contents
LC_CTX_RATELIMIT(3) | Librecast Programmer's Manual | LC_CTX_RATELIMIT(3) |
NAME¶
lc_ctx_ratelimit, lc_channel_ratelimit - set send/recv ratelimits
LIBRARY¶
Librecast library (liblibrecast, -llibrecast)
SYNOPSIS¶
#include <librecast/net.h>
void lc_ctx_ratelimit(lc_ctx_t *ctx, size_t bps_out, size_t bps_in); void lc_channel_ratelimit(lc_channel_t *chan, size_t bps_out, size_t bps_in);
Compile and link with -llibrecast.
DESCRIPTION¶
The lc_ctx_ratelimit function sets the default ratelimits for subsequent sockets and channels created with context ctx.
bps_out and 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 lc_socket_new(3) and lc_channel_new(3). Existing sockets and channels are unaffected.
lc_channel_ratelimit(3) sets the rate limits for channel chan similarly.
RETURN VALUE¶
These functions return no value.
ERRORS¶
None.
NOTES¶
Only the send limit is enforced at this time.
SEE ALSO¶
lc_ctx_new(3), lc_ctx_free(3), lc_socket_new(3), lc_channel_new(3), lc_channel_ratelimit(3)
2023-07-23 | LIBRECAST |