-
Notifications
You must be signed in to change notification settings - Fork 19
Cannot detect NOTIFY packets #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey there, currently there is no support for that. I believe it will be a good idea to implement this since this will be good for both M-SEARCH and NOTIFY, but a thought needs to be given on what happens if there are too many NOTIFY messages, that might congest the device. If it is running a server, it might slow it down in extreme situations, so there should be a flag to disable it. This will require some work, not seeing that I can get to it soon, if you can start a PR I can join and help as best I can. The link I provided is a good start. |
Okay, so you mean that the If so the link you shared is definitely a good start in order to implement this. I have tried using async calls before in my program and not a big fan of them as they might trigger watchdog timeouts. However, I will try implementing this and get back. In the case where we get too many NOTIFY messages, we can use a cyclic buffer which will avoid stack overflows. I think that will be a good start. And yes, a flag to disable the service is also needed. Thanks for the reply and guidance. |
not exactly, what I mean is that you would have to constantly listen to NOTIFY messages which is not feasible if you also have a server running on the same core. The async package should take care of this in the sense that you can be interrupting the server thread when NOTIFY messages are available. I think the link I shared is a package that will allow that. _udpclient can pick up NOTIFY messages but it will need to have a thread that is constantly active and checking if there are new packets. I think we can still make it work with _udpclient if we add a periodic check in the main loop but perhaps the interrupt will be better, since it will only interrupt the main loop if there are actually NOTIFY packets. Does that make sense? I hope I explained it well. |
Hi, I am using your library to discover a gateway. Facing an issue when the MSEARCH packet is sent out to [239.255.255.250] Port [1900], it only proceeds further on MSEARCH response packet and waits till it gets it (Precisely this function
waitForUnicastResponseToMSearch()
) However, I need it to also listen for NOTIFY packets in the function which is sent out by the gateway at regular intervals.I can see the notify packets from the gateway over other SSDP listeners. How can you enable listening to not only Msearch response packets but also notify packets in this library?
The text was updated successfully, but these errors were encountered: