res_close()--Close Socket and Reset _res Structure


  Syntax
 #include <sys/types.h>
 #include <netinet/in.h>
 #include <arpa/nameser.h>
 #include <resolv.h>

 void res_close(void)

  Service Program Name: QSOSRV2

  Default Public Authority: *USE

  Threadsafe: Yes

The res_close() function is used to reset the _res structure to the beginning defaults and close a socket that is opened as a result of the RES_STAYOPEN flag.


Authorities:

No authorization is required.


Return Value

None.


Usage Notes

  1. If res_send() was previously called with RES_STAYOPEN set in the options field of the _res structure, res_close() closes the socket that was left open. res_close() does not attempt the close if there was no socket left open.

  2. res_close() sets the _res structure to default values.

Related Information



API introduced: V3R1

[ Back to top | UNIX-Type APIs | APIs by category ]