ipv6 is working already

master 1.0.1
Steffen Pohle 3 years ago
parent de19cc1566
commit 010eb60b21

@ -96,13 +96,15 @@ TCP::TCP(string h, string p) {
};
/*
* puts the tcp server to listen mode. This code works on linux with IPV4 and IPV6
*/
int TCP::Listen(int port) {
char buffer[NET_BUFFERSIZE];
int err, i;
struct addrinfo hints, *res, *rp;
if (sock > 0) Close();
// FIXME: solution to get both (IPV4 and IPV6) to work at the same time?
bzero (&hints, sizeof (struct addrinfo));
hints.ai_flags = AI_PASSIVE;
#if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__)

Loading…
Cancel
Save