Merge branch 'prosody-tree'
[luaevent.git] / include / luaevent.h
blobe4199980ff1d3fea250b2ecaf9e0724563179e6c
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
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>
15 typedef struct {
16 struct event_base* base;
17 lua_State* loop_L;
18 } le_base;
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);
24 int luaopen_luaevent(lua_State* L);
26 #endif