socket: use getaddrinfo
authorpieterg <pieterg@users.sourceforge.net>
Thu, 7 May 2015 20:06:31 +0000 (22:06 +0200)
committerpieterg <pieterg@users.sourceforge.net>
Mon, 18 May 2015 14:51:14 +0000 (16:51 +0200)
commitd743e974b95b18c303dfebc27d253f6b323f08d9
tree174fab9e5bba0d53141939347eacb999b1aa1022
parent757930ad673892e9aa31ae016f234e3d2e459d33
socket: use getaddrinfo

gethostbyname is obsolete, and getaddrinfo allows
us to avoid IPv4/IPv6 dependencies.
Also, getaddrinfo can return multiple addresses,
allowing multihomed and/or multiprotocol services
to be bound or connected.

Same as d19775591b88bdc78689fd54798fdd490ba07f21
(which was reverted because of an uninitialized
eSocket::socketdesc member, fixed in this commit)
lib/network/serversocket.cpp
lib/network/serversocket.h
lib/network/socket.cpp
lib/network/socket.h