Updated: April 19, 2023 |
Open the host database file
#include <netdb.h> void sethostent( int stayopen );
If the stayopen flag is zero, queries use UDP datagrams.
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.
Safety: | |
---|---|
Cancellation point | Yes |
Interrupt handler | No |
Signal handler | No |
Thread | No |
This function uses static data; if you need the data for future use, you should copy it before any subsequent calls overwrite it.