cesanta / mongoose

Embedded Web Server
https://mongoose.ws
Other
11.05k stars 2.72k forks source link

Is it possible to add the mg_mqtt_unsub function? #2695

Closed huenrong closed 6 months ago

huenrong commented 6 months ago

Environment

scaprile commented 6 months ago

Please search, this has already been asked two weeks ago https://github.com/cesanta/mongoose/discussions/2662#discussioncomment-8901289 Since you opened an issue instead of asking a question, is there an actual embedded issue with an embedded use case that could be satisfied with this addition ? What would that use case be ?

huenrong commented 6 months ago

Please search, this has already been asked two weeks ago #2662 (comment) Since you opened an issue instead of asking a question, is there an actual embedded issue with an embedded use case that could be satisfied with this addition ? What would that use case be ?

Sorry

My usage scenario is: I get some device ID that need to be subscribed through mongoose HTTP, and subscribe to the topics of these devices through MQTT. But the devices that need to be subscribed change, so I need to unsubscribe

I used mg_mqtt_unsub function in my project and it works, but I didn't write the test case, if needed, I can try it

scaprile commented 6 months ago

I don't see the use case is worth it, you are free to have your function in your code or keep your fork. Thank you anyway.