EventLoop_RegisterIo Function
Header: #include <applibs/eventloop.h>
Registers an I/O event with an EventLoop.
EventRegistration *EventLoop_RegisterIo(EventLoop *el, int fd, EventLoop_IoEvents eventBitmask,
EventLoopIoCallback *callback, void *context);
Parameters
elThe EventLoop on which to register the I/O event.fdThe file descriptor for the I/O event.eventBitmaskThe bitmask of events to monitor.callbackA pointer to the callback function to call whenever a monitored event is raised.contextAn optional context pointer.
Return value
Returns a pointer to an EventRegistration object on success, otherwise NULL for failure, in which case errno is set to the error value.
Remarks
If this function succeeds, it returns a pointer to an EventRegistration object that tracks the registration operation. The EventRegistration object remains active until the application calls EventLoop_UnregisterIo on the object or closes the object with EventLoop_Close.
Povratne informacije
Pošalјite i prikažite povratne informacije za