Callbacks are called when a read on a file descriptor will not block.
More...
|
typedef void() | IE_CBF(int readfiledes, void *userpointer) |
| Signature of a callback. More...
|
|
typedef void() | IE_TCF(void *userpointer) |
| Signature of a timeout caller. More...
|
|
typedef void() | IE_WPF(void *userpointer) |
| Signature of a work procedure function. More...
|
|
typedef void() | IE_CBF(int readfiledes, void *userpointer) |
|
typedef void() | IE_TCF(void *userpointer) |
|
typedef void() | IE_WPF(void *userpointer) |
|
|
int | IEAddCallback (int readfiledes, IE_CBF *fp, void *userpointer) |
| Register a new callback, fp, to be called with userpointer as argument when readfiledes is ready. More...
|
|
void | IERmCallback (int callbackid) |
| Remove a callback function. More...
|
|
int | IEAddTimer (int millisecs, IE_TCF *fp, void *userpointer) |
| Register a new timer function, fp, to be called with ud as argument after ms. More...
|
|
void | IERmTimer (int timerid) |
| Remove the timer with the given timerid, as returned from IEAddTimer. More...
|
|
int | IEAddWorkProc (IE_WPF *fp, void *userpointer) |
| Add a new work procedure, fp, to be called with ud when nothing else to do. More...
|
|
void | IERmWorkProc (int workprocid) |
| Remove a work procedure. More...
|
|
int | IEDeferLoop (int maxms, int *flagp) |
|
int | IEDeferLoop0 (int maxms, int *flagp) |
|
Callbacks are called when a read on a file descriptor will not block.
Timers are called once after a specified interval. Workprocs are called when there is nothing else to do. The "Add" functions return a unique id for use with their corresponding "Rm" removal function. An arbitrary pointer may be specified when a function is registered which will be stored and forwarded unchanged when the function is later invoked.
◆ IE_CBF [1/2]
◆ IE_CBF [2/2]
typedef void() IE_CBF(int readfiledes, void *userpointer) |
◆ IE_TCF [1/2]
typedef void() IE_TCF(void *userpointer) |
◆ IE_TCF [2/2]
Signature of a timeout caller.
◆ IE_WPF [1/2]
Signature of a work procedure function.
◆ IE_WPF [2/2]
typedef void() IE_WPF(void *userpointer) |
◆ IEAddCallback()
int IEAddCallback |
( |
int |
readfiledes, |
|
|
IE_CBF * |
fp, |
|
|
void * |
userpointer |
|
) |
| |
Register a new callback, fp, to be called with userpointer as argument when readfiledes is ready.
- Parameters
-
readfiledes | file descriptor. |
fp | a pointer to the callback function. |
userpointer | a pointer to be passed to the callback function when called. |
- Returns
- a unique callback id for use with IERmCallback().
◆ IEAddTimer()
int IEAddTimer |
( |
int |
millisecs, |
|
|
IE_TCF * |
fp, |
|
|
void * |
userpointer |
|
) |
| |
Register a new timer function, fp, to be called with ud as argument after ms.
Add to list in order of decreasing time from epoch, ie, last entry runs soonest. The timer will only invoke the callback function once. You need to call addTimer again if you want to repeat the process.
- Parameters
-
millisecs | timer period in milliseconds. |
fp | a pointer to the callback function. |
userpointer | a pointer to be passed to the callback function when called. |
- Returns
- a unique id for use with IERmTimer().
◆ IEAddWorkProc()
int IEAddWorkProc |
( |
IE_WPF * |
fp, |
|
|
void * |
userpointer |
|
) |
| |
Add a new work procedure, fp, to be called with ud when nothing else to do.
- Parameters
-
fp | a pointer to the work procedure callback function. |
userpointer | a pointer to be passed to the callback function when called. |
- Returns
- a unique id for use with IERmWorkProc().
◆ IEDeferLoop()
int IEDeferLoop |
( |
int |
maxms, |
|
|
int * |
flagp |
|
) |
| |
◆ IEDeferLoop0()
int IEDeferLoop0 |
( |
int |
maxms, |
|
|
int * |
flagp |
|
) |
| |
◆ IERmCallback()
void IERmCallback |
( |
int |
callbackid | ) |
|
Remove a callback function.
- Parameters
-
◆ IERmTimer()
void IERmTimer |
( |
int |
timerid | ) |
|
Remove the timer with the given timerid, as returned from IEAddTimer.
- Parameters
-
◆ IERmWorkProc()
void IERmWorkProc |
( |
int |
workprocid | ) |
|
Remove a work procedure.
- Parameters
-
workprocid | The unique ID for the work procedure to be removed. |