I don't know about C, but I read that C++ doesn't have any "standard" library for networking stuff. I was wondering which libraries for C were more popular or higher acclaimed. And who better to ask than the experts themselves?

Many thanks in advance
diode

Recommended Answers

All 2 Replies

The libraries depends on the operating system which is why neither c nor c++ supports TCP/IP and networks directly. For MS-Windows just use win32 api functions found in winsock.h, which is pretty compatible with Berkley Sockets standard.

I don't know if there is a platform-independent socket library, but I suppose anything can happen.

There are probably many free socket libraries on the new, one of them is here.

As for platform, the one I am presently concerned with is UNIX/Linux. I have found out that the GNU C LIbrary contains a library for dealing with sockets.

To quote from the link I am providing as a reference to those who would be interested in the subject,

Not all operating systems support sockets. In the GNU library, the header file `sys/socket.h' exists regardless of the operating system, and the socket functions always exist, but if the system does not really support sockets, these functions always fail.

This is a very good article. I highly recommend it even if one is using another platform.
http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_15.html

Thanks,
diode

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.