mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-15 12:32:37 -04:00
Significant changes to aid UDP connections.
* Added Period and Delay parameters to connections. - Delay is used to avoid simultaneous TCP connections. - Period is used to regulate UDP connections. * added Delay code to pqissl. * added Period code to tcponudp / pqissludp. * modified TTL modification code. * increased SynPktRetransmit value. * fixed retrans() timeout (one reason code wasn't working before!) * fixed tou_close() SEGV bug. * modified pqissludp tou_socket creation. (non permanent now). * Modified format of peerConnectRequest() CB to make it more useful and rewrote function. * Enabled pqissludp NetInterface. * using Id comparision to determine Active/Passive UDP connection state. * added #def to disable TCP connections. (for testing) * enabled UDP connections from retryConnect() function. * corrected EXT check in retryConnect() function. * + lots of debug output and other stuff. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@358 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e87b7b75e7
commit
8b230a55cf
24 changed files with 381 additions and 87 deletions
|
@ -743,7 +743,7 @@ int p3DhtMgr::checkNotifyDHT()
|
|||
if (dhtNotify(peer.hash1, own.hash2, ""))
|
||||
{
|
||||
/* feedback to say we started it! */
|
||||
connCb->peerConnectRequest(peer.id, RS_CONNECT_ACTIVE);
|
||||
connCb->peerConnectRequest(peer.id, peer.raddr, RS_CB_DHT);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1247,6 +1247,8 @@ bool p3DhtMgr::dhtResultNotify(std::string idhash)
|
|||
|
||||
/* update data */
|
||||
std::string peerid;
|
||||
struct sockaddr_in raddr;
|
||||
|
||||
if (it != peers.end())
|
||||
{
|
||||
#ifdef DHT_DEBUG
|
||||
|
@ -1267,6 +1269,7 @@ bool p3DhtMgr::dhtResultNotify(std::string idhash)
|
|||
doNotify = true;
|
||||
it->second.notifyPending = 0;
|
||||
peerid = (it->second).id;
|
||||
raddr = (it->second).raddr;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1281,7 +1284,7 @@ bool p3DhtMgr::dhtResultNotify(std::string idhash)
|
|||
|
||||
/* do callback */
|
||||
if (doNotify)
|
||||
connCb->peerConnectRequest(peerid, RS_CONNECT_PASSIVE);
|
||||
connCb->peerConnectRequest(peerid, raddr, RS_CB_DHT);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1373,7 +1376,7 @@ bool p3DhtMgr::dhtResultSearch(std::string idhash,
|
|||
//ent.type, RS_CB_LOCAL_ADDR | RS_CB_REMOTE_ADDR, RS_CB_DHT);
|
||||
if (doNotify)
|
||||
{
|
||||
connCb->peerConnectRequest(ent.id, RS_CONNECT_PASSIVE);
|
||||
connCb->peerConnectRequest(ent.id, ent.raddr, RS_CB_DHT);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue