aboutsummaryrefslogtreecommitdiff
path: root/src/net/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/common.h')
-rw-r--r--src/net/common.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/net/common.h b/src/net/common.h
index dfac2e5..6bb161c 100644
--- a/src/net/common.h
+++ b/src/net/common.h
@@ -36,7 +36,7 @@ struct file_parse {
};
typedef struct {
- int fd;
+ int fd, ser;
int port;
lua_State* L;
struct sockaddr_in cli;
@@ -49,6 +49,10 @@ struct lchar {
char req[20];
};
+struct net_server_state {
+ int event_fd;
+};
+
struct sarray_t {
struct lchar** cs;
int len;
@@ -56,4 +60,12 @@ struct sarray_t {
extern map_t* mime_type;
+int start_serv(lua_State* L, int port, parray_t* paths, struct net_server_state*);
+
+enum {
+ NETEV_NULL = 0,
+ NETEV_DEFAULT = 1,
+ NETEV_CLOSE_EVENT = 2,
+};
+
#endif