include/event_callback.h

Wed, 15 Jul 2009 10:39:10 -0400

author
Thomas Harning Jr <harningt@gmail.com>
date
Wed, 15 Jul 2009 10:39:10 -0400
changeset 64
dd47dbe85bec
parent 23
897150985f13
child 77
ad37f03df138
permissions
-rw-r--r--

Merge branch 'v0.2'

/* LuaEvent - Copyright (C) 2007 Thomas Harning <harningt@gmail.com>
 * Licensed as LGPL - See doc/COPYING for details */
#ifndef EVENT_CALLBACK
#define EVENT_CALLBACK

#include "luaevent.h"
#include <lua.h>
#include <sys/types.h>
#include <sys/time.h>
#include <event.h>

typedef struct {
	struct event ev;
	le_base* base;
	int callbackRef;
	struct timeval timeout;
} le_callback;

int event_callback_register(lua_State* L);

le_callback* event_callback_push(lua_State* L, int baseIdx, int callbackIdx);

void luaevent_callback(int fd, short event, void* p);

#endif

mercurial