I just implemented support for name lookup in the class Connection. I used the opportunity to cleanup and document better UdpConnection and TcpConnection. The package Networks::Transports now conforms almost completely to our coding conventions.
The reason to implement host lookup was UHC. For testing purposes till now I used a hardcoded UHC IP address. Now it’s the host name that is hardcoded. A question still remaining open is how to get the names of some other UHCs? I’ve never got a pong with PHC GGEP yet. Actually I may be getting some but to be honest I haven’t checked whether they are incorrectly parsed and get dropped. I’ll have to check that one.
Still some tuning is required in ConnectionKeeper::bootstrap() to avoid querying too many UHCs while Calitko is bootstrapping and the node chache is still empty. I think it would take only very little work to also get UdpHostCache to respond to incoming UDP pings.
I noticed that a X-Try-Ultrapeers header was sent out even when we initiate the handshaking, which was wrong. Additionally, there was a typo in the header which I corrected.
Peter
