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?
Thanks for all quick replies. They were all useful and fits my needs but I have to choose one of them. Its really a matter of preference and I preferred APR. Mainly because its installed with Apache so in most cases my php extension (where i am going to use sockets) don't need user to download an extra package. Also Apache (as far as I have checked its code) uses APR, so it would be reliable. Therefore I am going to mark that reply as Answer.