Function netio_run

Function Documentation

void netio_run(struct netio_eventloop *evloop)

Executes the event loop.

The event loop is executed in an endless loop until it is explicitly terminated by netio_terminate. Before any processing any other event, netio_run will execute this initialization callback, if one was specified. The core of the event loop is epoll_wait. Note that epoll_wait returns only one event per fd, so MAX_EPOLL_EVENTS actually translates into the maximum number of fds that are processed in one iteration (the remaining fds are processed in a round-robin fashion in the next iteration).

Parameters:
  • evloop – The event loop to execute.