Hey,
What socket libraries does bitcoin use?
I found this in netbase.cpp:
#ifndef WIN32
#if HAVE_INET_PTON
#include <arpa/inet.h>
#endif
#include <fcntl.h>
#endif
Does that mean for OS X they use arpa/inet.h and for windows it's fcntl.h?
Do those two libraries use the same functions?
Thanks,
Ryan Ragle
This means that if WIN32 has not yet been defined, then if HAVE_INET_PTON is true, then it will include arpa/inet.h and fcntl.h, otherwise it will include just fcntl.h. These include apply to windows only because the condition surrounding the whole thing is checking for windows.
I'm assuming the two libraries are used because one is better than the other, but it doesn't exist on all systems. Later in the code you can see conditions for HAVE_INET_PTON which only compiles if that is true.