flyte/upnpclient

Event subscriptions

Opened this issue · 5 comments

First of all: Nice work!

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

flyte commented

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?

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 😄
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.

flyte commented

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 commented

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.

Can you write an example how use?