From 010eb60b218a682dc9d7cde1d29845b8ae40faf8 Mon Sep 17 00:00:00 2001 From: Steffen Pohle Date: Mon, 31 Oct 2022 17:13:09 +0100 Subject: [PATCH] ipv6 is working already --- tcp.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tcp.cc b/tcp.cc index 7a6a1a9..f8a3176 100644 --- a/tcp.cc +++ b/tcp.cc @@ -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__)