Phidget22.Net & NetServerAddedEventArgs / NetServerRemovedEventArgs

Comments & issues
Post Reply
Steve
Phidgetsian
Posts: 5
Joined: Fri Sep 22, 2006 10:31 am
Location: MSP, MN, USA
Contact:

Phidget22.Net & NetServerAddedEventArgs / NetServerRemovedEventArgs

Post by Steve »

Is it expected behavior that the value of the HostName property changes between the ServerAdd (NetServerAddedEventArgs.HostName) & ServerRemoved (NetServerRemovedEventArgs.HostName) events on a Wireless VINT Hub
HUB5000_0?

For example, I can observe the HostName changes from 'hub5000-01.local.' during the ServerAdded event to 'hub5000-01' during the ServerRemoved event.

Phidget22 - Version 1.15 - Built Jun 16 2023 14:03:46 / 1.15.20230616 / .NET 7.0
User avatar
Patrick
Lead Developer
Posts: 616
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Phidget22.Net & NetServerAddedEventArgs / NetServerRemovedEventArgs

Post by Patrick »

That's correct, we don't try to do a resolve on mDNS remove because there's a good chance it will fail, so the hostname, address and port are not available. If you want to match up server added and removed events, you should use the name field.

As for why the hostname has been set to the name in the remove event - I'm not exactly sure.

-Patrick
Post Reply

Who is online

Users browsing this forum: No registered users and 56 guests