Changeset View
Changeset View
Standalone View
Standalone View
src/seeder/netbase.h
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | inline void SerializationOp(Stream &s, Operation ser_action) { | ||||
unsigned short portN = htons(port); | unsigned short portN = htons(port); | ||||
READWRITE(portN); | READWRITE(portN); | ||||
if (ser_action.ForRead()) { | if (ser_action.ForRead()) { | ||||
pthis->port = ntohs(portN); | pthis->port = ntohs(portN); | ||||
} | } | ||||
} | } | ||||
}; | }; | ||||
enum Network ParseNetwork(std::string net); | |||||
void SplitHostPort(std::string in, int &portOut, std::string &hostOut); | |||||
bool SetProxy(enum Network net, CSeederService addrProxy, | bool SetProxy(enum Network net, CSeederService addrProxy, | ||||
int nSocksVersion = 5); | int nSocksVersion = 5); | ||||
bool GetProxy(enum Network net, CSeederService &addrProxy); | |||||
bool IsProxy(const CNetAddr &addr); | |||||
bool SetNameProxy(CSeederService addrProxy, int nSocksVersion = 5); | |||||
bool GetNameProxy(); | |||||
bool LookupHost(const char *pszName, std::vector<CNetAddr> &vIP, | bool LookupHost(const char *pszName, std::vector<CNetAddr> &vIP, | ||||
unsigned int nMaxSolutions = 0, bool fAllowLookup = true); | 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, CSeederService &addr, int portDefault = 0, | |||||
bool fAllowLookup = true); | |||||
bool Lookup(const char *pszName, std::vector<CSeederService> &vAddr, | |||||
int portDefault = 0, bool fAllowLookup = true, | |||||
unsigned int nMaxSolutions = 0); | |||||
bool LookupNumeric(const char *pszName, CSeederService &addr, | |||||
int portDefault = 0); | |||||
bool ConnectSocket(const CSeederService &addr, SOCKET &hSocketRet, | bool ConnectSocket(const CSeederService &addr, SOCKET &hSocketRet, | ||||
int nTimeout = nConnectTimeout); | int nTimeout = nConnectTimeout); | ||||
bool ConnectSocketByName(CSeederService &addr, SOCKET &hSocketRet, | |||||
const char *pszDest, int portDefault = 0, | |||||
int nTimeout = nConnectTimeout); | |||||
#endif | #endif |