💾 Archived View for gmi.noulin.net › gitRepositories › tuyau › file › rateLimiter › main.c.gmi captured on 2023-07-10 at 18:13:56. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-01-29)

-=-=-=-=-=-=-

tuyau

Log

Files

Refs

README

main.c (790B)

     1 #! /usr/bin/env sheepy
     2 /* or direct path to sheepy: #! /usr/local/bin/sheepy */
     3 
     4 #include "libsheepyObject.h"
     5 #include "rateLimiter.h"
     6 
     7 int main(int ARGC, char** ARGV) {
     8 
     9   initLibsheepy(ARGV[0]);
    10 
    11   createRateLimiter(rateLim);
    12 
    13   setupG(&rateLim, 1 /* max clients */, 1000 /* window */, 1 /* max access count */);
    14 
    15   logVarG(incomingG(&rateLim, 1));
    16   logVarG(incomingG(&rateLim, 1));
    17   logVarG(incomingG(&rateLim, 1));
    18   logVarG(incomingG(&rateLim, 1));
    19   logVarG(incomingG(&rateLim, 1));
    20   logVarG(incomingG(&rateLim, 1));
    21   /* incomingG(&rateLim, 2); */
    22   /* incomingG(&rateLim, 1); */
    23   /* incomingG(&rateLim, 2); */
    24   /* incomingG(&rateLim, 1); */
    25   /* incomingG(&rateLim, 2); */
    26   /* logVarG(clientCountG(&rateLim)); */
    27   /* logVarG(clientCountG(&rateLim)); */
    28 
    29   freeO(&rateLim);
    30 }