QNX Developer Support
|This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.|
Open the host database file
#include <netdb.h> void sethostent( int stayopen );
- Nonzero if you want all queries to the name server to use TCP and
you want the connection to be retained after each call to
If the stayopen flag is zero, queries use UDP datagrams.
Use the -l socket option to qcc to link against this library.
The sethostent() routine opens the host database file.
You can use the sethostent() function to request the use of a connected TCP socket for queries.
This function uses static data; if the data is needed for future use, it should be copied before any subsequent calls overwrite it.