GNU libmicrohttpd
0.9.72
|
counting of connections per IP More...
Go to the source code of this file.
Functions | |
int | MHD_ip_limit_add (struct MHD_Daemon *daemon, const struct sockaddr *addr, socklen_t addrlen) MHD_NONNULL(1 |
int void | MHD_ip_limit_del (struct MHD_Daemon *daemon, const struct sockaddr *addr, socklen_t addrlen) MHD_NONNULL(1 |
counting of connections per IP
Definition in file daemon_ip_limit.h.
int MHD_ip_limit_add | ( | struct MHD_Daemon * | daemon, |
const struct sockaddr * | addr, | ||
socklen_t | addrlen | ||
) |
Check if IP address is over its limit in terms of the number of allowed concurrent connections. If the IP is still allowed, increments the connection counter.
daemon | handle to daemon where connection counts are tracked |
addr | address to add (or increment counter) |
addrlen | number of bytes in addr |
int void MHD_ip_limit_del | ( | struct MHD_Daemon * | daemon, |
const struct sockaddr * | addr, | ||
socklen_t | addrlen | ||
) |
Decrement connection count for IP address, removing from table count reaches 0.
daemon | handle to daemon where connection counts are tracked |
addr | address to remove (or decrement counter) |
addrlen | number of bytes in addr |