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

#include <lua.h>

#include "connection.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 *);
void plop_drop_thread(const int);
int plop_handle_client(lua_State *, struct connection *);
int plop_handle_server(const int, const int);