Send HELLO instead of NOP for NAT-t in order to measure latency always. Also prevents a race that can cause the first NAT-t to fail where the NOP arrives before the WHOIS reply from the supernode. Now NAT-t initiators will push their own public keys anyway so that doesnt matter.

This commit is contained in:
Adam Ierymenko 2013-07-06 16:20:35 -04:00
parent 2eaac3891e
commit ef08494237
2 changed files with 25 additions and 5 deletions

View file

@ -106,6 +106,16 @@ public:
*/
void sendHELLO(const Address &dest);
/**
* Send a HELLO announcement immediately to the indicated address
*
* @param localPort Originating local port or ANY_PORT to pick
* @param addr IP address to send to
* @param dest Destination peer
* @return True if send appears successful
*/
bool sendHELLO(const SharedPtr<Peer> &dest,Demarc::Port localPort,const InetAddress &addr);
/**
* Send RENDEZVOUS to two peers to permit them to directly connect
*