Added flood control support.

This closes bug #79: Flood control, and rate limits
This commit is contained in:
Jan Vidar Krey
2010-04-05 15:51:18 +02:00
parent 5454ae279a
commit 8815118fde
12 changed files with 278 additions and 20 deletions

View File

@@ -155,6 +155,12 @@ int net_backend_process()
return 1;
}
time_t net_get_time()
{
return g_backend->now;
}
void net_con_initialize(struct net_connection* con, int sd, net_connection_cb callback, const void* ptr, int events)
{
g_backend->handler.con_init(g_backend->data, con, sd, callback, ptr);

View File

@@ -75,6 +75,11 @@ extern void net_backend_shutdown();
*/
extern int net_backend_process();
/**
* Get the current time.
*/
time_t net_get_time();
extern struct timeout_queue* net_backend_get_timeout_queue();
struct net_cleanup_handler* net_cleanup_initialize(size_t max);