1 #ifndef __CONNECTION_H__
2 #define __CONNECTION_H__
7 #include "httpp/httpp.h"
8 #include "thread/thread.h"
13 typedef struct connection_tag
28 /* For 'fake' connections */
33 void connection_initialize(void);
34 void connection_shutdown(void);
35 void connection_accept_loop(void);
36 void connection_close(connection_t
*con
);
37 connection_t
*create_connection(sock_t sock
, sock_t serversock
, char *ip
);
38 int connection_create_source(struct _client_tag
*client
, connection_t
*con
,
39 http_parser_t
*parser
, char *mount
);
41 void connection_inject_event(int eventnum
, void *event_data
);
43 int connection_check_source_pass(http_parser_t
*parser
, char *mount
);
44 int connection_check_relay_pass(http_parser_t
*parser
);
45 int connection_check_admin_pass(http_parser_t
*parser
);
47 extern rwlock_t _source_shutdown_rwlock
;
49 #endif /* __CONNECTION_H__ */