I am porting a program which uses posix sockets to work in windows. I am not particularly familiar with sockets and so am learning as I go. I am aware of some of the required changes based on various sources, e.g. here and this stackoverflow question. However, I am wondering whether there is any commonly used header or code sample which abstracts away some of the differences.
The kind of thing I am imagining is a header with defines which map the WSA* error codes to the BSD equivalents where they exist, has macros for calling
WSAGetLastError. as required, and that kind of thing. Anything which eases the process of making this cross-platform.
I am aware of full fledged alternatives like
boost::asio, but that would mean reimplementing everything which I do not want to do
Does anything like this exist? It will need to be under a GPL compatible library.