One way to bootstrap using UDP pings is to ping a UHC and we already have a basic implementation of that. Another way is to send UDP pings to nodes from NodeCache. A simple UDP ping is much less expensive than establishing a TCP connection and handshaking. To my knowledge most modern Gnutella clients respond to UDP pings just like a UHC would – by sending a bunch of fresh (IP, port) values in a IPP GGEP extension. These addresses can be used for establishing TCP Gnutella connections.
It would even make sense to try a TCP connection to a node that responded to a UDP ping and reported it has free slots. I do not know if the others do that, but it seems like a good idea! We have already personally verified that the node is up; and that is not the case with IIP addresses. I’ll have to try out and see if the results are better.
UdpSwitch and UdpConnection still require more work and I’ll probably do some improvements there shortly. The attached patch extends ConnectionKeeper to perform UDP pinging.
