sts icon indicating copy to clipboard operation
sts copied to clipboard

sts_net, socket accept doesn't work on Windows

Open jimon opened this issue 8 years ago • 1 comments

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.

jimon avatar Jan 26 '17 22:01 jimon

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 :)

kieselsteini avatar Apr 25 '17 11:04 kieselsteini