refactor conns.[ch], put conn_s into child struct
this allows to access the conn member from the main thread handling the childs, plus simplifies the code.
This commit is contained in:
1 parent
5779ba8697
commit
0c8275a90e
5 files changed
+37
-57
No files matched your search
+7
-5
@@ -87,11 +87,13 @@ struct conn_s {
|
||||
struct upstream *upstream_proxy;
|
||||
};
|
||||
|
||||
/*
|
||||
* Functions for the creation and destruction of a connection structure.
|
||||
*/
|
||||
extern struct conn_s *initialize_conn (int client_fd, const char *ipaddr,
|
||||
/* expects pointer to zero-initialized struct, set up struct
|
||||
with default values for initial use */
|
||||
extern void conn_struct_init(struct conn_s *connptr);
|
||||
|
||||
/* second stage initializiation, sets up buffers and connection details */
|
||||
extern int conn_init_contents (struct conn_s *connptr, const char *ipaddr,
|
||||
const char *sock_ipaddr);
|
||||
extern void destroy_conn (struct conn_s *connptr);
|
||||
extern void conn_destroy_contents (struct conn_s *connptr);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user