mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-19 22:40:36 -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
|
@ -329,9 +329,11 @@ int pqipersongrp::connectPeer(std::string id)
|
|||
return 0;
|
||||
|
||||
struct sockaddr_in addr;
|
||||
uint32_t delay;
|
||||
uint32_t period;
|
||||
uint32_t type;
|
||||
|
||||
if (!mConnMgr->connectAttempt(id, addr, type))
|
||||
if (!mConnMgr->connectAttempt(id, addr, delay, period, type))
|
||||
{
|
||||
std::cerr << " pqipersongrp::connectPeer() No Net Address";
|
||||
std::cerr << std::endl;
|
||||
|
@ -340,6 +342,8 @@ int pqipersongrp::connectPeer(std::string id)
|
|||
|
||||
std::cerr << " pqipersongrp::connectPeer() connectAttempt data id: " << id;
|
||||
std::cerr << " addr: " << inet_ntoa(addr.sin_addr) << ":" << ntohs(addr.sin_port);
|
||||
std::cerr << " delay: " << delay;
|
||||
std::cerr << " period: " << period;
|
||||
std::cerr << " type: " << type;
|
||||
std::cerr << std::endl;
|
||||
|
||||
|
@ -360,7 +364,7 @@ int pqipersongrp::connectPeer(std::string id)
|
|||
else
|
||||
return 0;
|
||||
|
||||
p->connect(ptype, addr);
|
||||
p->connect(ptype, addr, delay, period);
|
||||
|
||||
/* */
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue