Can I wakeup mongoose w/o a connection context? #3256
Replies: 2 comments 29 replies
-
We know Zephyr, we support Zephyr. |
Beta Was this translation helpful? Give feedback.
-
Honestly. mg_wakeup is used in multithreading environments within that frame; https://mongoose.ws/tutorials/core/multi-threaded/ If you explain what you want to do and provide an example, we'll be more than glad to help you out to find the best way to do it. Please see our documentation, and follow the guidelines in our tutorials. PS: Closing this, you can still write, it can be opened again or moved to an issue if necessary. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using mongoose with the Zephyr RTOS environment. Zephyr has IPC schemes that cannot be polled like a normal kernel socket. (Zephyr uses entirely unique polling infrastructure when working between sockets or any thing you might want to poll, which is very annoying.)
My workaround is I wake mongoose when I have a zephyr style message to send to the mongoose task. My mongoose callback will poll the zephyr style polling infrastructure when it is woken and process the zephyr style ipc.
However, this ipc scheme is not neccessarily associated with a client connection. So i passed the client id as 0, and so the waker sees this 0 connection and decides not to wake. This is unfortunate for me.
I understand we dont want to call the mongoose callback with a NULL connection as this might be breaking behavior. But it is worth considering this use case and perhaps a new event can be allowed for a special kind of wake that does not associated with a connection. This would prevent breaking code that relies on a connection being present when it is woken
Beta Was this translation helpful? Give feedback.
All reactions