Home  +  Forums  +  C++ and Sockets  +  C++ and SQL: MySQL, sqlite, ODBC  +  Miscellaneous Projects
Logo
~Sockets~
~New~
~Examples~
~Contact~

C++ Socket library tutorial

Configuration

Prev   |   Menu   |   Next

The functions of the C++ sockets library are no longer selected by defining compile time flags (in the Makefile or in an IDE project file). This old way of configuration has been replaced by the file 'sockets-config.h', which contains a few #define's for different functions of the library.

SymbolMeaningDefault
HAVE_OPENSSLOpenSSL support.ON
ENABLE_IPV6This makes it possible to disable ipv6 support in the library even if your operating system supports it.OFF
USE_SCTPAdd class SctpSocket to the library.OFF
NO_GETADDRINFOOn operating systems without ipv6 support, getaddrinfo/getnameinfo isn't available. Define this symbol to use other methods for dns and reverse lookup.ON
ENABLE_POOLConnection poolOFF
ENABLE_SOCKS4Socks4 client supportOFF
ENABLE_RESOLVERSupport for asynchronous dns lookup. If this symbol is defined, ENABLE_DETACH also has to be defined. ON
ENABLE_RECONNECTTcp sockets can reconnect when connection is lostON
ENABLE_DETACHMake sockets able to detach themselves, i.e. start running in an own thread. Needed for ENABLE_RESOLVER.ON
ENABLE_EXCEPTIONSThrow exception for fatal errors (Bind, CreateSocket).ON
ENABLE_XMLThe Xml classes (using libxml2)OFF

Prev   |   Menu   |   Next

Valid HTML 4.01!

Validate
Page, code, and content Copyright (C) 2021 by Anders Hedström