mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-22 15:51:29 -04:00
First of the V0.6 changes.
- Adding basics for proxy connection. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6682 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
23acb91915
commit
212b4c44c9
19 changed files with 916 additions and 73 deletions
|
@ -47,6 +47,8 @@ const uint32_t RS_NET_CONN_TUNNEL = 0x0f00;
|
|||
const uint32_t RS_NET_CONN_TCP_LOCAL = 0x0001;
|
||||
const uint32_t RS_NET_CONN_TCP_EXTERNAL = 0x0002;
|
||||
const uint32_t RS_NET_CONN_TCP_UNKNOW_TOPOLOGY = 0x0004;
|
||||
const uint32_t RS_NET_CONN_TCP_HIDDEN = 0x0008;
|
||||
|
||||
const uint32_t RS_NET_CONN_UDP_DHT_SYNC = 0x0010;
|
||||
const uint32_t RS_NET_CONN_UDP_PEER_SYNC = 0x0020; /* coming soon */
|
||||
|
||||
|
@ -80,6 +82,10 @@ class peerConnectAddress
|
|||
struct sockaddr_in proxyaddr;
|
||||
struct sockaddr_in srcaddr;
|
||||
uint32_t bandwidth;
|
||||
|
||||
// Extra Parameters for Proxy/Hidden connection.
|
||||
std::string domain_addr;
|
||||
uint16_t domain_port;
|
||||
};
|
||||
|
||||
class peerConnectState
|
||||
|
@ -159,7 +165,8 @@ virtual void removeMonitor(pqiMonitor *mon) = 0;
|
|||
/****************** Connections *******************/
|
||||
virtual bool connectAttempt(const std::string &id, struct sockaddr_in &raddr,
|
||||
struct sockaddr_in &proxyaddr, struct sockaddr_in &srcaddr,
|
||||
uint32_t &delay, uint32_t &period, uint32_t &type, uint32_t &flags, uint32_t &bandwidth) = 0;
|
||||
uint32_t &delay, uint32_t &period, uint32_t &type, uint32_t &flags, uint32_t &bandwidth,
|
||||
std::string &domain_addr, uint16_t &domain_port) = 0;
|
||||
|
||||
virtual bool connectResult(const std::string &id, bool success, uint32_t flags, struct sockaddr_in remote_peer_address) = 0;
|
||||
virtual bool retryConnect(const std::string &id) = 0;
|
||||
|
@ -218,7 +225,8 @@ virtual void removeMonitor(pqiMonitor *mon);
|
|||
/****************** Connections *******************/
|
||||
virtual bool connectAttempt(const std::string &id, struct sockaddr_in &raddr,
|
||||
struct sockaddr_in &proxyaddr, struct sockaddr_in &srcaddr,
|
||||
uint32_t &delay, uint32_t &period, uint32_t &type, uint32_t &flags, uint32_t &bandwidth);
|
||||
uint32_t &delay, uint32_t &period, uint32_t &type, uint32_t &flags, uint32_t &bandwidth,
|
||||
std::string &domain_addr, uint16_t &domain_port);
|
||||
|
||||
virtual bool connectResult(const std::string &id, bool success, uint32_t flags, struct sockaddr_in remote_peer_address);
|
||||
virtual bool retryConnect(const std::string &id);
|
||||
|
@ -290,6 +298,7 @@ void locked_ConnectAttempt_CurrentAddresses(peerConnectState *peer, struct sock
|
|||
void locked_ConnectAttempt_HistoricalAddresses(peerConnectState *peer, const pqiIpAddrSet &ipAddrs);
|
||||
void locked_ConnectAttempt_AddDynDNS(peerConnectState *peer, std::string dyndns, uint16_t dynPort);
|
||||
void locked_ConnectAttempt_AddTunnel(peerConnectState *peer);
|
||||
void locked_ConnectAttempt_ProxyAddress(peerConnectState *peer, struct sockaddr_in *proxy_addr, const std::string &domain_addr, uint16_t domain_port);
|
||||
|
||||
bool locked_ConnectAttempt_Complete(peerConnectState *peer);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue