(svn r15993) -Codechange: clean up/generalise the handling of the server list
This commit is contained in:
@@ -45,21 +45,6 @@ private:
|
||||
*/
|
||||
SOCKET Resolve(int family, int socktype, int flags, SocketList *sockets, LoopProc func);
|
||||
public:
|
||||
/**
|
||||
* Create a network address based on a resolved IP and port
|
||||
* @param ip the resolved ip
|
||||
* @param port the port
|
||||
*/
|
||||
NetworkAddress(in_addr_t ip, uint16 port) :
|
||||
address_length(sizeof(sockaddr))
|
||||
{
|
||||
*this->hostname = '\0';
|
||||
memset(&this->address, 0, sizeof(this->address));
|
||||
this->address.ss_family = AF_INET;
|
||||
((struct sockaddr_in*)&this->address)->sin_addr.s_addr = ip;
|
||||
this->SetPort(port);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a network address based on a resolved IP and port
|
||||
* @param address the IP address with port
|
||||
|
@@ -289,6 +289,10 @@ static inline bool SetNoDelay(SOCKET d)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Make sure these structures have the size we expect them to be */
|
||||
assert_compile(sizeof(in_addr) == 4);
|
||||
assert_compile(sizeof(in6_addr) == 16);
|
||||
|
||||
#endif /* ENABLE_NETWORK */
|
||||
|
||||
#endif /* NETWORK_CORE_OS_ABSTRACTION_H */
|
||||
|
Reference in New Issue
Block a user