mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-21 23:40:26 -04:00
added server-based ip determination as a fallback to existing methods. Forced Dht publishing as soon as an external ip is known
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1110 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
e23bd13bc9
commit
304bd556e0
2 changed files with 270 additions and 0 deletions
21
libretroshare/src/tcponudp/extaddrfinder.h
Normal file
21
libretroshare/src/tcponudp/extaddrfinder.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#include "util/rsthreads.h"
|
||||
|
||||
struct sockaddr ;
|
||||
|
||||
class ExtAddrFinder
|
||||
{
|
||||
public:
|
||||
ExtAddrFinder() ;
|
||||
~ExtAddrFinder() ;
|
||||
|
||||
bool hasValidIP(struct sockaddr_in *addr) ;
|
||||
|
||||
void start_request() ;
|
||||
|
||||
RsMutex _addrMtx ;
|
||||
struct sockaddr_in *_addr ;
|
||||
bool *_found ;
|
||||
bool *_searching ;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue