Is there any free open source library (in C/C++) for sockets that is widely used and supports wide range of operating systems (Windows, Unix/Linux, FreeBSD etc). Just like pthreads.
Otherwise the only solution left would be to write socket wrapper for each operating system. Or would writing a wrapper against winsock and GNU C sys/socket.h libraries would be enough?
Wouldn’t it be possible that I implement it against the socket library provided with GNU C. GNU C is available for wide range of platforms and my code will work in all those platforms?
I believe both the Apache Portable Runtime and GTK+’s GLib libraries have socket APIs. Since your question is tagged
candc++I suspect you really want C++-centric answers, but both of these are good as pure C libraries.