Oops... turns out we need to differentiate incoming from outgoing TCP and indeed learn incoming TCP paths. Otherwise the recipient of a TCP connection does not know to reply via TCP! Heh.

This commit is contained in:
Adam Ierymenko 2014-03-31 22:23:55 -07:00
parent 595b386afc
commit f13493edb2
11 changed files with 147 additions and 110 deletions

View file

@ -122,22 +122,20 @@ public:
/**
* Send a HELLO announcement immediately to the indicated address
*
* @param fromSock Send from this local socket
* @param dest Destination peer
* @param remoteAddr Remote address
* @param path Network path to peer
* @return True if send appears successful
*/
bool sendHELLO(const SharedPtr<Socket> &fromSock,const SharedPtr<Peer> &dest,const InetAddress &remoteAddr);
bool sendHELLO(const SharedPtr<Peer> &dest,const Path &path);
/**
* Send a HELLO announcement immediately to the indicated address
* Send a HELLO announcement immediately to the indicated address via UDP
*
* @param dest Destination peer
* @param remoteAddr Remote address
* @param tcp Attempt to use TCP?
* @param destUdp UDP inet address
* @return True if send appears successful
*/
bool sendHELLO(const SharedPtr<Peer> &dest,const InetAddress &remoteAddr,bool tcp);
bool sendHELLO(const SharedPtr<Peer> &dest,const InetAddress &destUdp);
/**
* Send RENDEZVOUS to two peers to permit them to directly connect