include/luaevent.h

1
/* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com>
2
 * Licensed as LGPL - See doc/COPYING for details */
3
#ifndef LUAEVENT_H
4
#define LUAEVENT_H
5
 
6
#include <lua.h>
7
#include <sys/types.h>
8
#ifdef _WIN32
9
#include <winsock2.h>
10
#else
11
#include <sys/time.h>
12
#endif
13
#include <event.h>
14
 
15
typedef struct {
16
	struct event_base* base;
17
	lua_State* loop_L;
18
} le_base;
19
 
20
le_base* event_base_get(lua_State* L, int idx);
21
void load_timeval(double time, struct timeval *tv);
22
int getSocketFd(lua_State* L, int idx);
23
 
24
int luaopen_luaevent(lua_State* L);
25
 
26
#endif