The removesocketfromlist() call removes a socket from the list of owned sockets for the calling process.
Syntax
#include <types.h> #include <sys\socket.h> int removesockettolist(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() or soclose() call is made the list is updated. The removesocketfromlist() call provides a mechanism to transfer socket ownership to another process: it removes the socket indicated by the s parameter from the calling process's socket ownership list.
Return Values
The value 1 indicates success; the value 0 indicates that the socket could not be found in the list.
Related Calls