mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-15 04:22:27 -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
|
@ -48,13 +48,12 @@
|
|||
#endif /* X509 Certificates */
|
||||
/**************** PQI_USE_XPGP ******************/
|
||||
|
||||
|
||||
#define WAITING_NOT 0
|
||||
#define WAITING_SOCK_CONNECT 1
|
||||
#define WAITING_SSL_CONNECTION 2
|
||||
#define WAITING_SSL_AUTHORISE 3
|
||||
#define WAITING_FAIL_INTERFACE 4
|
||||
|
||||
#define WAITING_DELAY 1
|
||||
#define WAITING_SOCK_CONNECT 2
|
||||
#define WAITING_SSL_CONNECTION 3
|
||||
#define WAITING_SSL_AUTHORISE 4
|
||||
#define WAITING_FAIL_INTERFACE 5
|
||||
|
||||
#define PQISSL_PASSIVE 0x00
|
||||
#define PQISSL_ACTIVE 0x01
|
||||
|
@ -105,6 +104,8 @@ virtual int stoplistening();
|
|||
virtual int reset();
|
||||
virtual int disconnect();
|
||||
|
||||
virtual bool connect_parameter(uint32_t type, uint32_t value);
|
||||
|
||||
// BinInterface
|
||||
virtual int tick();
|
||||
virtual int status();
|
||||
|
@ -130,6 +131,9 @@ int waiting;
|
|||
|
||||
virtual int Failed_Connection();
|
||||
|
||||
// Start up connection with delay...
|
||||
virtual int Delay_Connection();
|
||||
|
||||
// These two fns are overloaded for udp/etc connections.
|
||||
virtual int Initiate_Connection();
|
||||
virtual int Basic_Connection_Complete();
|
||||
|
@ -190,8 +194,8 @@ virtual int net_internal_fcntl_nonblock(int fd) { return unix_fcntl_nonblock(fd)
|
|||
|
||||
int ssl_connect_timeout; /* timeout to ensure that we don't get stuck (can happen on udp!) */
|
||||
|
||||
private:
|
||||
|
||||
uint32_t mConnectDelay;
|
||||
time_t mConnectTS;
|
||||
|
||||
/**************** PQI_USE_XPGP ******************/
|
||||
#if defined(PQI_USE_XPGP)
|
||||
|
@ -205,6 +209,7 @@ private:
|
|||
|
||||
p3ConnectMgr *mConnMgr;
|
||||
|
||||
private:
|
||||
// ssl only fns.
|
||||
int connectInterface(sockaddr_in&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue