Raven Core  3.0.0
P2P Digital Currency
Classes | Functions | Variables
netbase.h File Reference
#include "compat.h"
#include "netaddress.h"
#include "serialize.h"
#include <stdint.h>
#include <string>
#include <vector>
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  proxyType
 

Functions

enum Network ParseNetwork (std::string net)
 
std::string GetNetworkName (enum Network net)
 
bool SetProxy (enum Network net, const proxyType &addrProxy)
 
bool GetProxy (enum Network net, proxyType &proxyInfoOut)
 
bool IsProxy (const CNetAddr &addr)
 
bool SetNameProxy (const proxyType &addrProxy)
 
bool HaveNameProxy ()
 
bool GetNameProxy (proxyType &nameProxyOut)
 
bool LookupHost (const char *pszName, std::vector< CNetAddr > &vIP, unsigned int nMaxSolutions, bool fAllowLookup)
 
bool LookupHost (const char *pszName, CNetAddr &addr, bool fAllowLookup)
 
bool Lookup (const char *pszName, CService &addr, int portDefault, bool fAllowLookup)
 
bool Lookup (const char *pszName, std::vector< CService > &vAddr, int portDefault, bool fAllowLookup, unsigned int nMaxSolutions)
 
CService LookupNumeric (const char *pszName, int portDefault=0)
 
bool LookupSubNet (const char *pszName, CSubNet &subnet)
 
bool ConnectSocketDirectly (const CService &addrConnect, SOCKET &hSocketRet, int nTimeout)
 
bool ConnectThroughProxy (const proxyType &proxy, const std::string &strDest, int port, SOCKET &hSocketRet, int nTimeout, bool *outProxyConnectionFailed)
 
std::string NetworkErrorString (int err)
 Return readable error string for a network error code. More...
 
bool CloseSocket (SOCKET &hSocket)
 Close socket and set hSocket to INVALID_SOCKET. More...
 
bool SetSocketNonBlocking (const SOCKET &hSocket, bool fNonBlocking)
 Disable or enable blocking-mode for a socket. More...
 
bool SetSocketNoDelay (const SOCKET &hSocket)
 Set the TCP_NODELAY flag on a socket. More...
 
struct timeval MillisToTimeval (int64_t nTimeout)
 Convert milliseconds to a struct timeval for e.g. More...
 
void InterruptSocks5 (bool interrupt)
 

Variables

int nConnectTimeout
 
bool fNameLookup
 

Function Documentation

◆ CloseSocket()

bool CloseSocket ( SOCKET hSocket)

Close socket and set hSocket to INVALID_SOCKET.

Definition at line 687 of file netbase.cpp.

Here is the caller graph for this function:

◆ ConnectSocketDirectly()

bool ConnectSocketDirectly ( const CService addrConnect,
SOCKET hSocketRet,
int  nTimeout 
)

Definition at line 456 of file netbase.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ConnectThroughProxy()

bool ConnectThroughProxy ( const proxyType proxy,
const std::string &  strDest,
int  port,
SOCKET hSocketRet,
int  nTimeout,
bool *  outProxyConnectionFailed 
)

Definition at line 591 of file netbase.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNameProxy()

bool GetNameProxy ( proxyType nameProxyOut)

Definition at line 569 of file netbase.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetNetworkName()

std::string GetNetworkName ( enum Network  net)

Definition at line 52 of file netbase.cpp.

◆ GetProxy()

bool GetProxy ( enum Network  net,
proxyType proxyInfoOut 
)

Definition at line 552 of file netbase.cpp.

Here is the caller graph for this function:

◆ HaveNameProxy()

bool HaveNameProxy ( )

Definition at line 577 of file netbase.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InterruptSocks5()

void InterruptSocks5 ( bool  interrupt)

Definition at line 734 of file netbase.cpp.

Here is the caller graph for this function:

◆ IsProxy()

bool IsProxy ( const CNetAddr addr)

Definition at line 582 of file netbase.cpp.

◆ Lookup() [1/2]

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

Definition at line 160 of file netbase.cpp.

Here is the call graph for this function:

◆ Lookup() [2/2]

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

Definition at line 142 of file netbase.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LookupHost() [1/2]

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

Definition at line 119 of file netbase.cpp.

Here is the caller graph for this function:

◆ LookupHost() [2/2]

bool LookupHost ( const char *  pszName,
CNetAddr addr,
bool  fAllowLookup 
)

Definition at line 132 of file netbase.cpp.

Here is the call graph for this function:

◆ LookupNumeric()

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

Definition at line 170 of file netbase.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LookupSubNet()

bool LookupSubNet ( const char *  pszName,
CSubNet subnet 
)

Definition at line 615 of file netbase.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MillisToTimeval()

struct timeval MillisToTimeval ( int64_t  nTimeout)

Convert milliseconds to a struct timeval for e.g.

select.

Definition at line 180 of file netbase.cpp.

Here is the caller graph for this function:

◆ NetworkErrorString()

std::string NetworkErrorString ( int  err)

Return readable error string for a network error code.

Definition at line 669 of file netbase.cpp.

Here is the caller graph for this function:

◆ ParseNetwork()

enum Network ParseNetwork ( std::string  net)

Definition at line 44 of file netbase.cpp.

◆ SetNameProxy()

bool SetNameProxy ( const proxyType addrProxy)

Definition at line 561 of file netbase.cpp.

Here is the call graph for this function:

◆ SetProxy()

bool SetProxy ( enum Network  net,
const proxyType addrProxy 
)

Definition at line 543 of file netbase.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetSocketNoDelay()

bool SetSocketNoDelay ( const SOCKET hSocket)

Set the TCP_NODELAY flag on a socket.

Definition at line 727 of file netbase.cpp.

Here is the caller graph for this function:

◆ SetSocketNonBlocking()

bool SetSocketNonBlocking ( const SOCKET hSocket,
bool  fNonBlocking 
)

Disable or enable blocking-mode for a socket.

Definition at line 700 of file netbase.cpp.

Here is the caller graph for this function:

Variable Documentation

◆ fNameLookup

bool fNameLookup

Definition at line 38 of file netbase.cpp.

◆ nConnectTimeout

int nConnectTimeout

Definition at line 37 of file netbase.cpp.