The addsockettolist() call adds a socket to the list of owned sockets for the calling process.
Syntax
#include <types.h> #include <sys\socket.h> void addsockettolist(s) int s;
Parameters
s
Description
When a process ends, the sockets library automatically cleans up sockets by registering an exit list handler. This exit routine closes all open sockets that are maintained in a process's socket list. When a process is initiated the list is empty, and whenever a socket(), accept(), or soclose() call is made the list is updated. The addsockettolist() call provides a mechanism to transfer socket ownership to another process. The addsockettolist() call adds the socket indicated by the s parameter to the calling process's socket ownership list.
Return Values
The value 1 indicates success; the value 0 indicates an error.
Related Calls