buffer_event learned get_read/get_write buffer accessors
[luaevent.git] / include / event_callback.h
blob38aedb81914ac44522494eadb58ed348a8ae4c70
1 /* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com>
2 * Licensed as LGPL - See doc/COPYING for details */
3 #ifndef EVENT_CALLBACK
4 #define EVENT_CALLBACK
6 #include "luaevent.h"
7 #include <lua.h>
8 #include <sys/types.h>
9 #include <sys/time.h>
10 #include <event.h>
12 typedef struct {
13 struct event ev;
14 le_base* base;
15 int callbackRef;
16 struct timeval timeout;
17 } le_callback;
19 int event_callback_register(lua_State* L);
21 le_callback* event_callback_push(lua_State* L, int baseIdx, int callbackIdx);
23 void luaevent_callback(int fd, short event, void* p);
25 #endif