include/event_callback.h

Mon, 16 Jan 2012 04:25:48 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 16 Jan 2012 04:25:48 +0000
changeset 109
df22d2e85fb0
parent 77
ad37f03df138
permissions
-rw-r--r--

event_callback.c: Don't delete and re-add the event if the timeout hasn't changed

/* 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"

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