event_buffer learned how to read/write from/to sockets/file-descriptors
[luaevent.git] / include / luaevent.h
blobef3386bdbef5f0af99616eece3d1fa561b7337ba
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 #include <sys/time.h>
9 #include <event.h>
11 typedef struct {
12 struct event_base* base;
13 lua_State* loop_L;
14 } le_base;
16 le_base* event_base_get(lua_State* L, int idx);
17 void load_timeval(double time, struct timeval *tv);
18 int getSocketFd(lua_State* L, int idx);
20 int luaopen_luaevent(lua_State* L);
22 #endif