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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user