fkuehne / upnpx

Officially endorsed fork of the discontinued upnpx library by Bruno Keymolen
Other
260 stars 113 forks source link

Not receiving all events #75

Open zbrox opened 8 years ago

zbrox commented 8 years ago

I'm subscribing for a service but I'm not reliably receiving all the events. When I check all traffic with Wireshark I can see events that are incoming but are not always registering with the observer.

Is anybody else experiencing this?

bluegaspode commented 2 months ago

Hi @zbrox , yes I have this problem as well. The reason for this is,

@fkuehne , i have a solution for this in a local fork, is this still interesting for this project? My solution has two parts:

UPnPEvents gets a buffer for all arriving events, that are not yet assignable to an observer BasicUPnPService gets a buffer for "currentStateVariableValues". Whenever an observer subscribes and state variables have arrived already, these are sent immediatly to the observer.

An observer can subsribe 'whenever' he wants, if if events arrived earlier the subscriber is guaranteed to get an initial set of current values.

fkuehne commented 2 months ago

@bluegaspode sure, a pull request would be welcome!