2016-05-12 04:36:12 +08:00
|
|
|
---
|
|
|
|
title: "mg_mgr_poll()"
|
|
|
|
decl_name: "mg_mgr_poll"
|
|
|
|
symbol_kind: "func"
|
|
|
|
signature: |
|
|
|
|
time_t mg_mgr_poll(struct mg_mgr *, int milli);
|
|
|
|
---
|
|
|
|
|
2016-07-26 22:53:33 +08:00
|
|
|
This function performs the actual IO and must be called in a loop
|
|
|
|
(an event loop). It returns the current timestamp.
|
2016-05-12 04:36:12 +08:00
|
|
|
`milli` is the maximum number of milliseconds to sleep.
|
2016-07-26 22:53:33 +08:00
|
|
|
`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
|
2016-05-12 04:36:12 +08:00
|
|
|
event handlers and returns.
|
|
|
|
|