Unify usage of sys/socket.h (Unix) and winsock2.h (MinGW)
Go to file
2024-12-20 22:08:43 +01:00
examples Fix typo 2024-12-20 21:58:52 +01:00
.gitignore Initial commit 2024-12-20 21:48:42 +01:00
LICENSE Initial commit 2024-12-20 21:48:42 +01:00
main.c Initial commit 2024-12-20 21:48:42 +01:00
README.txt Fix mistake in doc 2024-12-20 22:08:43 +01:00

Unify usage of sys/socket.h (Unix) and winsock2.h (MinGW)

Include <unisocket/main.c> and call unisocket_init()

Compatible with Windows 95 OSR2

This is not a drop-in unix compatible socket header! winsock2 works slightly differently, but fully platform-independant code is possible with this header. The examples are platform-independant, and have been tested on Windows and Linux. Compile them by running examples/main.sh

For further intricacies, read the example source code. Annotated portions contain important notes!

Implements these things on Windows:
* socklen_t
* inet_pton