Following the last two patches now comes a basic UDP host cache implementation. If the NodeCache is empty, then the UdpHostCache is queried in order to get some fresh pongs. That works now only with only a single hard-coded UHC, simply because do not know of any other yet. It’s even just the resolved IP address, which is wrong, however, because UdpConnection does not resolve names, as it should! Speaking about UdpConnection, some work needs be done to prevent recursive readyRead() and bytesWritten() signals.
UdpHostCache should be extended to answer UDP pings. Additionally, ConnectionKeeper should try to ping some regular Gnutella nodes over UDP before pinging any one of the UHCs. The idea is that a UDP ping is cheaper than a (probably unsuccessful) TCP handshake and from what I read on the Internet, that’s the best way to bootstrap a Gnutella node.
I noticed that we sometimes connect twice or more to the same host and that is totally wrong! Probably NodeCache is broken now. There is some issue with updating the node cache after a handshaking has failed. To be checked in more detail!
Committed in revision 12. Resolved some conflicts with the dynamic searching patch (rev. 9) in LocalPeer.*.
