From 0457119acb36b89b6f2f4534fe8ad94b19540bbd Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Fri, 2 Dec 2022 12:18:57 +0800 Subject: Refactor --- connection.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 connection.h (limited to 'connection.h') diff --git a/connection.h b/connection.h new file mode 100644 index 0000000..c7b24fc --- /dev/null +++ b/connection.h @@ -0,0 +1,15 @@ +#include "tsocket.h" +#include "eventloop.h" + +#ifndef __CONNECTION_H +#define __CONNECTION_H + +struct connection { + struct tsocket *sock; +}; + +struct connection *connectionNew(struct tsocket *sock); +void connectionDel(struct connection *conn); +struct event *connectionNewEvent(struct connection *conn); + +#endif -- cgit v1.2.3