#include "tsocket.h" #include "evloop.h" #ifndef __CONNECTION_H #define __CONNECTION_H struct connection; typedef struct connection connection_t; typedef void (*connection_callback_func_t)(connection_t *conn); connection_t *connection_create(struct tsocket *sock); void connection_destroy(struct connection *conn); event_t *connection_event_create(struct tsocket *sock, connection_callback_func_t func); int connection_fd(connection_t *conn); #endif