AutoDiscovery not Updating Member List

I am attempting to use AutoDiscovery to find all other devices running the same program on the network. My code:

socAD = New clsAD // a class based upon AutoDiscovery socAD.Port = cADport // a constant port, same on every device socAD.Connect socAD.Register(ADGroupName) // a method that returns a group name, same on every device socAD.SendToSelf = False socAD.UpdateMemberList Dim aList() As String = socAD.GetMemberList
At that point aList.Ubound is always -1 even when I have successfully registered any number of devices with the same port and GroupName.

Now I put a little countdown before UpdateMemberList with 10 ticks in it, and, with two other devices on, GetMemberList will equal what it should be. My question, what’s a safe number of ticks to put in? If I have 30 devices on that network, I feel comfortable that 10 ticks wouldn’t do it, but I’m not going to know how many there are.

Any suggestions?

Querying all members of the group is not instantaneous.
It could easily take several seconds depending on a number of factors.

So how many ticks would you suggest to cover all the bases?

I’d create a multimode timer action that looks for members on a regular basis since there’s no “carved in stone” time rule for such a service.

Network packets can drop out - and since auto discovery is based on UDP there’s no guarantee that a packet will arrive.
So members might appear to come & go
There are events for member added & member left that you might want to monitor