mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
6290d8fed9
In preparation for making RS support IPv6. NB: This breaks the build of retroshare-gui, as the sockaddr_storage_xxx fns are only defined as prototypes for now. All the aux libraries like udp / stun / tcponudp / dht have still to be converted. These changes will probably break various things and need to be tested thoroughly. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6735 b45a01b8-16f6-495d-af2f-9b41ad6348cc
33 lines
586 B
C++
33 lines
586 B
C++
#pragma once
|
|
|
|
#include <list>
|
|
#include <string>
|
|
#include "util/rsthreads.h"
|
|
#include "util/rsnet.h"
|
|
|
|
struct sockaddr ;
|
|
|
|
class ExtAddrFinder
|
|
{
|
|
public:
|
|
ExtAddrFinder() ;
|
|
~ExtAddrFinder() ;
|
|
|
|
bool hasValidIP(struct sockaddr_storage &addr) ;
|
|
void getIPServersList(std::list<std::string>& ip_servers) { ip_servers = _ip_servers ; }
|
|
|
|
void start_request() ;
|
|
|
|
void reset() ;
|
|
|
|
private:
|
|
friend void* doExtAddrSearch(void *p) ;
|
|
|
|
RsMutex mAddrMtx ;
|
|
time_t mFoundTS;
|
|
struct sockaddr_storage mAddr;
|
|
bool mFound ;
|
|
bool mSearching ;
|
|
std::list<std::string> _ip_servers ;
|
|
};
|