VMS Help  —  TCPIP Services, Programming Interfaces, Socket API Functions, sethostent()
    Opens the hosts database file.
    Format
      #include  <netdb.h>
      void sethostent  (int stay_open);

1  –  Argument

 stay_open
    Specifies a value used to indicate when to close the hosts
    database file (TCPIP$ETC:IPNODES.DAT):
    o  A value of 0 closes the hosts database file after each call
       to the gethostbyname(), gethostbyaddr(),  or gethostent()
       function.
    o  A nonzero value keeps the hosts database file open after each
       call.

2  –  Description

    This function opens the hosts database file and resets the file
    marker to the beginning of the file.
    Passing a nonzero value to the stay_open argument keeps the
    connection open until the endhostent() or exit()  function is
    called.
    Related Functions
    See also endhostent().
Close Help