I was trying to establish a tcp connection to an IPv6 webserver.
I tried the examples but things don't seem to work.
Ubuntu 16.04 32bit
#define MG_ENABLE_IPV6 1 #define MG_ENABLE_DEBUG 1
Using code from simplest_web_server/ and http_client/
Both, server and client work fine with ipv4, with ipv6 I cannot establish connection.
Debug output from server doesnt give me much information back,
output from client:
mg_connect_opt 0x9cfbbc8 tcp://[::1]:8000 -,-,- mg_do_connect 0x9cfbbc8 tcp://0.0.0.0:8000 mg_socket_if_connect 0x9cfbbc8 sock 5 rc -1 errno 97 err 97
I was trying to use netcat or curl to establish connection to the mongoose server, this failed too:
curl -gv 6 "http://[::1]:8000 ... Trying ::1... connect to ::1 port 8000 failed: Connection refused
Opening a listener via netcat and using netcat or curl to connect works fine.
Trying to use mongoose http_client results in same error as above.
Does anyone have hints what could be the problem?