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 }