sts
sts copied to clipboard
sts_net, socket accept doesn't work on Windows
So, I'm looking through the example, but it fails to work on Windows, I'm creating server and client, client connects just fine, and on server side sts_net_check_socket_set returns 1 on listening socket, but sts_net_accept_socket returns -1 as socket failed. Haven't really figured out why is that though.
Hey....I was able to reproduce this on Windows 10 when IPv6 is available. The simplest fix is probably to change line 285 to hints.ai_family = AF_INET; This will limit the library to IPv4 but fixes the accept() problem.
A real fix might follow sometime :)