Feathercoin  0.5.0
P2P Digital Currency
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Classes | Typedefs | Enumerations | Functions | Variables
netbase.h File Reference
#include <string>
#include <vector>
#include "serialize.h"
#include "compat.h"
Include dependency graph for netbase.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CNetAddr
 IP address (IPv6, or IPv4 using mapped IPv6 range (::FFFF:0:0/96)) More...
 
class  CService
 A combination of a network address (CNetAddr) and a (TCP) port. More...
 

Typedefs

typedef std::pair< CService, int > proxyType
 

Enumerations

enum  Network {
  NET_UNROUTABLE, NET_IPV4, NET_IPV6, NET_TOR,
  NET_MAX
}
 

Functions

enum Network ParseNetwork (std::string net)
 
void SplitHostPort (std::string in, int &portOut, std::string &hostOut)
 
bool SetProxy (enum Network net, CService addrProxy, int nSocksVersion=5)
 
bool GetProxy (enum Network net, proxyType &proxyInfoOut)
 
bool IsProxy (const CNetAddr &addr)
 
bool SetNameProxy (CService addrProxy, int nSocksVersion=5)
 
bool HaveNameProxy ()
 
bool LookupHost (const char *pszName, std::vector< CNetAddr > &vIP, unsigned int nMaxSolutions=0, bool fAllowLookup=true)
 
bool LookupHostNumeric (const char *pszName, std::vector< CNetAddr > &vIP, unsigned int nMaxSolutions=0)
 
bool Lookup (const char *pszName, CService &addr, int portDefault=0, bool fAllowLookup=true)
 
bool Lookup (const char *pszName, std::vector< CService > &vAddr, int portDefault=0, bool fAllowLookup=true, unsigned int nMaxSolutions=0)
 
bool LookupNumeric (const char *pszName, CService &addr, int portDefault=0)
 
bool ConnectSocket (const CService &addr, SOCKET &hSocketRet, int nTimeout=nConnectTimeout)
 
bool ConnectSocketByName (CService &addr, SOCKET &hSocketRet, const char *pszDest, int portDefault=0, int nTimeout=nConnectTimeout)
 

Variables

int nConnectTimeout
 
bool fNameLookup
 

Typedef Documentation

typedef std::pair<CService, int> proxyType

Definition at line 134 of file netbase.h.

Enumeration Type Documentation

enum Network
Enumerator
NET_UNROUTABLE 
NET_IPV4 
NET_IPV6 
NET_TOR 
NET_MAX 

Definition at line 20 of file netbase.h.

Function Documentation

bool ConnectSocket ( const CService addr,
SOCKET hSocketRet,
int  nTimeout = nConnectTimeout 
)

Definition at line 473 of file netbase.cpp.

bool ConnectSocketByName ( CService addr,
SOCKET hSocketRet,
const char *  pszDest,
int  portDefault = 0,
int  nTimeout = nConnectTimeout 
)

Definition at line 505 of file netbase.cpp.

bool GetProxy ( enum Network  net,
proxyType proxyInfoOut 
)

Definition at line 432 of file netbase.cpp.

bool HaveNameProxy ( )

Definition at line 459 of file netbase.cpp.

bool IsProxy ( const CNetAddr addr)

Definition at line 464 of file netbase.cpp.

bool Lookup ( const char *  pszName,
CService addr,
int  portDefault = 0,
bool  fAllowLookup = true 
)

Definition at line 151 of file netbase.cpp.

bool Lookup ( const char *  pszName,
std::vector< CService > &  vAddr,
int  portDefault = 0,
bool  fAllowLookup = true,
unsigned int  nMaxSolutions = 0 
)

Definition at line 133 of file netbase.cpp.

bool LookupHost ( const char *  pszName,
std::vector< CNetAddr > &  vIP,
unsigned int  nMaxSolutions = 0,
bool  fAllowLookup = true 
)

Definition at line 115 of file netbase.cpp.

bool LookupHostNumeric ( const char *  pszName,
std::vector< CNetAddr > &  vIP,
unsigned int  nMaxSolutions = 0 
)

Definition at line 128 of file netbase.cpp.

bool LookupNumeric ( const char *  pszName,
CService addr,
int  portDefault = 0 
)

Definition at line 161 of file netbase.cpp.

enum Network ParseNetwork ( std::string  net)

Definition at line 29 of file netbase.cpp.

bool SetNameProxy ( CService  addrProxy,
int  nSocksVersion = 5 
)

Definition at line 441 of file netbase.cpp.

bool SetProxy ( enum Network  net,
CService  addrProxy,
int  nSocksVersion = 5 
)

Definition at line 421 of file netbase.cpp.

void SplitHostPort ( std::string  in,
int &  portOut,
std::string &  hostOut 
)

Definition at line 37 of file netbase.cpp.

Variable Documentation

bool fNameLookup

Definition at line 25 of file netbase.cpp.

int nConnectTimeout

Definition at line 30 of file netbase.h.