upnpclient icon indicating copy to clipboard operation
upnpclient copied to clipboard

Event subscriptions

Open smaiLee opened this issue 7 years ago • 5 comments

First of all: Nice work!

Your client doesn't know anything about events, right? Or did I just miss this in code?

smaiLee avatar Aug 25 '17 12:08 smaiLee

Nope, that's not something I've implemented just yet. I expect we could add the configuration of the event subscription, but not necessarily the actual server for it to call back to - that may be beyond the scope of this library.

What do you think?

flyte avatar Aug 25 '17 12:08 flyte

Actually I'm just at the beginning of knowing UPnP and didn't yet investigate what the call back server has to do in detail :smile: But I see the problem of implementing a long living server in the library.

But otherwise a control point has to implement events. And actually this library could provide anything a control point needs.

As far as I read the events are sent by HTTP verb NOTIFY and have the sequence number in HTTP header. So, unfortunately, you can not just use a "normal" webserver for call back and parse the received content by this lib.

smaiLee avatar Aug 25 '17 12:08 smaiLee

What you see here is my current understanding of uPnP - I learned it while writing this library :)

I think perhaps we can add something to make handling the incoming messages simpler, as well as sending the HTTP SUBSCRIBE request. I'd have to have a play around with it/read the documentation again to see what's required.

flyte avatar Aug 26 '17 10:08 flyte

I've added event subscription/renewal/deletion to the library. In the next episode I'll add a way of parsing the responses too. Leaving this issue open until then.

flyte avatar Aug 29 '17 14:08 flyte

Can you write an example how use?

castorinop avatar Mar 19 '18 17:03 castorinop