Opens and rewinds the network host database file.
Format
#include <netdb.h>
void sethostent (int stay_open);
Arguments
- stay_open
- Specifies a value used to indicate when to close the host
database file:
- 0 (zero) to close the host database file after each call
to the gethostbyname or gethostbyaddr routine.
- nonzero to keep the host database file open after each
call.
Description
The sethostent routine opens or rewinds the network host
database file and resets the file marker to the beginning of the
file.
Passing a nonzero value to the stay_open parameter keeps
the connection open until the endhostent or exit routine is called.
See also endhostent in this section.
Previous Page | Next Page | Table of Contents | Index