Added a safe connection cleanup procedure for when a connection goes

down while it may be attempted to be used.
This commit is contained in:
Jan Vidar Krey
2010-01-21 01:12:57 +01:00
parent f645811f37
commit 9f5aaf0148
7 changed files with 120 additions and 24 deletions

View File

@@ -20,6 +20,9 @@
#ifndef HAVE_UHUB_NETWORK_BACKEND_H
#define HAVE_UHUB_NETWORK_BACKEND_H
struct net_cleanup_handler;
struct net_connection;
/**
* Initialize the network backend.
* Returns 1 on success, or 0 on failure.
@@ -38,4 +41,13 @@ extern int net_backend_process();
extern struct timeout_queue* net_backend_get_timeout_queue();
struct net_cleanup_handler* net_cleanup_initialize(size_t max);
void net_cleanup_shutdown(struct net_cleanup_handler* handler);
void net_cleanup_delayed_free(struct net_cleanup_handler* handler, struct net_connection* con);
void net_cleanup_process(struct net_cleanup_handler* handler);
#endif /* HAVE_UHUB_NETWORK_BACKEND_H */