mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-15 17:37:12 -05:00
ad96c86f68
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1796 b45a01b8-16f6-495d-af2f-9b41ad6348cc
32 lines
557 B
C++
32 lines
557 B
C++
#pragma once
|
|
|
|
#include <list>
|
|
#include <string>
|
|
#include "util/rsthreads.h"
|
|
|
|
struct sockaddr ;
|
|
|
|
class ExtAddrFinder
|
|
{
|
|
public:
|
|
ExtAddrFinder() ;
|
|
~ExtAddrFinder() ;
|
|
|
|
bool hasValidIP(struct sockaddr_in *addr) ;
|
|
void getIPServersList(std::list<std::string>& ip_servers) { ip_servers = _ip_servers ; }
|
|
|
|
void start_request() ;
|
|
|
|
void reset() ;
|
|
|
|
private:
|
|
friend void* doExtAddrSearch(void *p) ;
|
|
|
|
time_t *mFoundTS;
|
|
RsMutex _addrMtx ;
|
|
struct sockaddr_in *_addr ;
|
|
bool *_found ;
|
|
bool *_searching ;
|
|
std::list<std::string> _ip_servers ;
|
|
};
|