1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Infer ipv6_server from bind_address; fix client connect to IN(6)ADDR_ANY

This commit is contained in:
Kahrl 2014-03-07 01:00:03 +01:00 committed by sapier
parent edcad09dee
commit 6090e95cdc
7 changed files with 88 additions and 47 deletions

View file

@ -88,6 +88,7 @@ public:
Address(const IPv6AddressBytes * ipv6_bytes, u16 port);
bool operator==(Address &address);
bool operator!=(Address &address);
// Resolve() may throw ResolveError (address is unchanged in this case)
void Resolve(const char *name);
struct sockaddr_in getAddress() const;
unsigned short getPort() const;
@ -97,6 +98,7 @@ public:
struct sockaddr_in6 getAddress6() const;
int getFamily() const;
bool isIPv6() const;
bool isZero() const;
void setPort(unsigned short port);
void print(std::ostream *s) const;
std::string serializeString() const;