summaryrefslogtreecommitdiffhomepage
path: root/plop.h
blob: 903fb1f49e67c172b8f2a48a6d02475b0cfc0749 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include <sys/epoll.h>

#include <lua.h>

struct plop
{
	const char * handler;
	lua_State * L;
	int efd;
};

extern struct plop plop;

lua_State * plop_initialize_lua(void);
int open_server(const char *, const char *);
int plop_load_handler(lua_State *, const char *);
int plop_handle_client(lua_State *, struct epoll_event *);
int plop_handle_server(lua_State *, const int, const int);