#ifndef CHTTPD_CONN_H #define CHTTPD_CONN_H #include "chttpd-log.h" #include "chttpd-server.h" #include #include #define CHTTPD_CONN_BUF_SIZE 4096 typedef struct { /* read-only */ unsigned long long id; int connfd; ChttpdLog* hlog; ChttpdServer *server; LbsListMeta *slist; LbsList* conn_node; /* reference to the corresponding node in server->conn */ /* read-write and lock */ pthread_rwlock_t lock; pid_t pid; /* private */ char buf[CHTTPD_CONN_BUF_SIZE]; } ChttpdConn; void* chttpd_conn_admin (void* ptr_to_ChttpdConn); /* TODO: implement this */ void* chttpd_conn_http (void* ptr_to_ChttpdConn); void chttpd_conn_ctor (void* conn_generic, unsigned long long id, int connfd, ChttpdLog* hlog, ChttpdServer* server, LbsListMeta* slist); void chttpd_conn_dtor (void* conn_generic); #endif /* CHTTTP_CONN_H */