Changeset View
Changeset View
Standalone View
Standalone View
src/netaddress.h
Show First 20 Lines • Show All 162 Lines • ▼ Show 20 Lines | protected: | ||||
// host order | // host order | ||||
unsigned short port; | unsigned short port; | ||||
public: | public: | ||||
CService(); | CService(); | ||||
CService(const CNetAddr &ip, unsigned short port); | CService(const CNetAddr &ip, unsigned short port); | ||||
CService(const struct in_addr &ipv4Addr, unsigned short port); | CService(const struct in_addr &ipv4Addr, unsigned short port); | ||||
CService(const struct sockaddr_in &addr); | CService(const struct sockaddr_in &addr); | ||||
void SetPort(unsigned short portIn); | |||||
unsigned short GetPort() const; | unsigned short GetPort() const; | ||||
bool GetSockAddr(struct sockaddr *paddr, socklen_t *addrlen) const; | bool GetSockAddr(struct sockaddr *paddr, socklen_t *addrlen) const; | ||||
bool SetSockAddr(const struct sockaddr *paddr); | bool SetSockAddr(const struct sockaddr *paddr); | ||||
friend bool operator==(const CService &a, const CService &b); | friend bool operator==(const CService &a, const CService &b); | ||||
friend bool operator!=(const CService &a, const CService &b) { | friend bool operator!=(const CService &a, const CService &b) { | ||||
return !(a == b); | return !(a == b); | ||||
} | } | ||||
friend bool operator<(const CService &a, const CService &b); | friend bool operator<(const CService &a, const CService &b); | ||||
Show All 20 Lines |