![]() |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
#include "netbase.h"#include "hash.h"#include "sync.h"#include "uint256.h"#include "random.h"#include "util.h"#include "utilstrencodings.h"#include <atomic>#include <fcntl.h>#include <boost/algorithm/string/case_conv.hpp>#include <boost/algorithm/string/predicate.hpp>#include <boost/thread.hpp>Go to the source code of this file.
Classes | |
| struct | ProxyCredentials |
Enumerations | |
| enum | IntrRecvError { IntrRecvError::OK, IntrRecvError::Timeout, IntrRecvError::Disconnected, IntrRecvError::NetworkError, IntrRecvError::Interrupted } |
Functions | |
| enum Network | ParseNetwork (std::string net) |
| std::string | GetNetworkName (enum Network net) |
| void | SplitHostPort (std::string in, int &portOut, std::string &hostOut) |
| 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, std::vector< CService > &vAddr, int portDefault, bool fAllowLookup, unsigned int nMaxSolutions) |
| bool | Lookup (const char *pszName, CService &addr, int portDefault, bool fAllowLookup) |
| CService | LookupNumeric (const char *pszName, int portDefault) |
| struct timeval | MillisToTimeval (int64_t nTimeout) |
| Convert milliseconds to a struct timeval for e.g. More... | |
| bool | SetProxy (enum Network net, const proxyType &addrProxy) |
| bool | GetProxy (enum Network net, proxyType &proxyInfoOut) |
| bool | SetNameProxy (const proxyType &addrProxy) |
| bool | GetNameProxy (proxyType &nameProxyOut) |
| bool | HaveNameProxy () |
| bool | IsProxy (const CNetAddr &addr) |
| bool | ConnectSocket (const CService &addrDest, SOCKET &hSocketRet, int nTimeout, bool *outProxyConnectionFailed) |
| bool | ConnectSocketByName (CService &addr, SOCKET &hSocketRet, const char *pszDest, int portDefault, int nTimeout, bool *outProxyConnectionFailed) |
| bool | LookupSubNet (const char *pszName, CSubNet &ret) |
| 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 (SOCKET &hSocket, bool fNonBlocking) |
| Disable or enable blocking-mode for a socket. More... | |
Variables | |
| int | nConnectTimeout = DEFAULT_CONNECT_TIMEOUT |
| bool | fNameLookup = false |
|
strong |
| Enumerator | |
|---|---|
| OK | |
| Timeout | |
| Disconnected | |
| NetworkError | |
| Interrupted | |
Definition at line 252 of file netbase.cpp.
| bool CloseSocket | ( | SOCKET & | hSocket | ) |
Close socket and set hSocket to INVALID_SOCKET.
Definition at line 735 of file netbase.cpp.
| bool ConnectSocket | ( | const CService & | addrDest, |
| SOCKET & | hSocketRet, | ||
| int | nTimeout, | ||
| bool * | outProxyConnectionFailed | ||
| ) |
Definition at line 627 of file netbase.cpp.
| bool ConnectSocketByName | ( | CService & | addr, |
| SOCKET & | hSocketRet, | ||
| const char * | pszDest, | ||
| int | portDefault, | ||
| int | nTimeout, | ||
| bool * | outProxyConnectionFailed | ||
| ) |
Definition at line 639 of file netbase.cpp.
| bool GetNameProxy | ( | proxyType & | nameProxyOut | ) |
Definition at line 577 of file netbase.cpp.
| std::string GetNetworkName | ( | enum Network | net | ) |
| bool HaveNameProxy | ( | ) |
| bool IsProxy | ( | const CNetAddr & | addr | ) |
| 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 | ||
| ) |
Definition at line 206 of file netbase.cpp.
| bool LookupHost | ( | const char * | pszName, |
| CNetAddr & | addr, | ||
| bool | fAllowLookup | ||
| ) |
| bool LookupHost | ( | const char * | pszName, |
| std::vector< CNetAddr > & | vIP, | ||
| unsigned int | nMaxSolutions, | ||
| bool | fAllowLookup | ||
| ) |
| CService LookupNumeric | ( | const char * | pszName, |
| int | portDefault | ||
| ) |
Definition at line 234 of file netbase.cpp.
| bool LookupSubNet | ( | const char * | pszName, |
| CSubNet & | ret | ||
| ) |
Definition at line 667 of file netbase.cpp.
| struct timeval MillisToTimeval | ( | int64_t | nTimeout | ) |
Convert milliseconds to a struct timeval for e.g.
select.
Definition at line 244 of file netbase.cpp.
| std::string NetworkErrorString | ( | int | err | ) |
Return readable error string for a network error code.
Definition at line 718 of file netbase.cpp.
| enum Network ParseNetwork | ( | std::string | net | ) |
Definition at line 51 of file netbase.cpp.
| bool SetNameProxy | ( | const proxyType & | addrProxy | ) |
Definition at line 548 of file netbase.cpp.
| bool SetSocketNonBlocking | ( | SOCKET & | hSocket, |
| bool | fNonBlocking | ||
| ) |
Disable or enable blocking-mode for a socket.
Definition at line 751 of file netbase.cpp.
| void SplitHostPort | ( | std::string | in, |
| int & | portOut, | ||
| std::string & | hostOut | ||
| ) |
Definition at line 74 of file netbase.cpp.
| bool fNameLookup = false |
Definition at line 46 of file netbase.cpp.
| int nConnectTimeout = DEFAULT_CONNECT_TIMEOUT |
Definition at line 45 of file netbase.cpp.
1.8.17