2018-02-03 01:16:14 +02:00
|
|
|
---
|
|
|
|
title: "mg_mgr_poll()"
|
|
|
|
decl_name: "mg_mgr_poll"
|
|
|
|
symbol_kind: "func"
|
|
|
|
signature: |
|
2018-07-09 13:16:58 +03:00
|
|
|
int mg_mgr_poll(struct mg_mgr *mgr, int milli);
|
2018-02-03 01:16:14 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
This function performs the actual IO and must be called in a loop
|
2018-07-09 13:16:58 +03:00
|
|
|
(an event loop). It returns number of user events generated (except POLLs).
|
2018-02-03 01:16:14 +02:00
|
|
|
`milli` is the maximum number of milliseconds to sleep.
|
|
|
|
`mg_mgr_poll()` checks all connections for IO readiness. If at least one
|
|
|
|
of the connections is IO-ready, `mg_mgr_poll()` triggers the respective
|
|
|
|
event handlers and returns.
|
|
|
|
|