blob: e85716b1f203f64aa0682ad0f246a4166cc5f330 (
plain) (
tree)
|
|
#ifndef CHTTPD_SERVER_H
#define CHTTPD_SERVER_H
#include <l4list.h>
#include <pthread.h>
#include <stdbool.h>
#include <sys/socket.h>
typedef struct {
/* read-only */
int sockfd;
struct sockaddr_storage addr;
socklen_t addrlen;
int attr_admin : 1;
ChttpdLog* hlog;
/* read-write and lock */
pthread_rwlock_t lock;
LbsListMeta* conn;
int attr_close : 1;
} ChttpdServer;
extern int chttpd_server_notify;
extern pthread_mutex_t chttpd_server_notify_mutex;
extern ChttpdServer chttpd_server_notify_data;
extern unsigned long long chttpd_server_count;
extern pthread_rwlock_t chttpd_server_count_lock;
void chttpd_server_ctor (void* server_generic, ChttpdLog* hlog, bool is_admin);
void chttpd_server_dtor (void* server_generic);
#endif /* CHTTPD_SERVER_H */
|