FixIO Documentation

Back to summary

C API

Functions

void fixio_register_functions(Heap *heap);
Registers I/O functions to given heap.

Integration with foreign event loop

typedef void (*IOEventNotifyFunc)(void *data);
Notification function type.
void fixio_integrate_event_loop(Heap *heap, IOEventNotifyFunc notify_func, void *notify_data);
Integrates the event loop with an external event loop. This is achieved by waiting on the I/O in another thread. The given callback function is called whenever there is something to process. The callback should pass this information to the foreign loop and once processed the event handler must call the fixio_process_events function to process the I/O events in the main thread.
Note: Only one event loop can be integrated in particular heap and the integration is currently permanent.
void fixio_process_events(Heap *heap);
Processes the I/O events initiated by the callback passed to fixio_integrate_event_loop. This function must not be called at any other time.