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_ratelimit, lc_channel_ratelimit - set send/recv ratelimits

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.

Errors

       None.

Library

       Librecast library (liblibrecast, -llibrecast)

Name

       lc_ctx_ratelimit, lc_channel_ratelimit - set send/recv ratelimits

Notes

       Only the send limit is enforced at this time.

Return Value

       These functions return no value.

See Also

lc_ctx_new(3), lc_ctx_free(3), lc_socket_new(3), lc_channel_new(3), lc_channel_ratelimit(3)

LIBRECAST                                          2023-07-23                                LC_CTX_RATELIMIT(3)

Synopsis

#include<librecast/net.h>voidlc_ctx_ratelimit(lc_ctx_t*ctx,size_tbps_out,size_tbps_in);voidlc_channel_ratelimit(lc_channel_t*chan,size_tbps_out,size_tbps_in);

       Compile and link with -llibrecast.

See Also