External event loop #2555
-
Is there a recommended way to integrate mongoose in an external event loop or to poll some custom fd's in the poll loop of mongoose? I have to threads:
I read about mg_wakeup() in the documentation, but it seems it is tied to a mongoose connection and can only be used in a request/reply scenario. Do I miss anything? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
The only exception to that is mg_wakeup(), usage example here: https://mongoose.ws/tutorials/multi-threaded/ . Yes, our assumed usage model is request/reply. |
Beta Was this translation helpful? Give feedback.
-
Yes you do have, your listener is also a connection |
Beta Was this translation helpful? Give feedback.
Yes you do have, your listener is also a connection
Just follow https://mongoose.ws/documentation/tutorials/webui-plain/
Check this example, quickly done by mixing from existent examples and tutorials: #2556