07-11-2021 02:34 PM - edited 07-11-2021 02:36 PM
Basically if you add this to the front of that example that I posted earlier you should be able to compile it. Of course there might be still some wrenches in the wheels, since your C compiler is not the same as mine but that is not something I can help with.
#define WIN32_LEAN_AND_MEAN
#include <stdio.h>
#include <stdint.h> // only available in Visual Studio 2010 and later
#include <winsock2.h>
#define DEFAULT_BUFLEN 256
Of course you also will have to add the ws2_32.lib import file to your project build specification to let the compiler find the implementation of the Winsock functions.