When the hub connects to the hublist, it must undergo a similar Lock/Key negotiation. The <key> calculation is the same, but the special number 5 in the second step is replaced with the following value computed from the hub's port, <localport>:
((localport>>8) + (localport & 255)) & 255
[/quote]
So the equivalent to this in VB would be :
Code: Select all
((Winsock.LocalPort \ (2^8)) + (Winsock.LocalPort And 255)) And 255