This function deletes a descriptor from the per-process object
reference table. Associated TCP connections close first.
If a call to connect() fails for a socket in connection mode,
applications should use close() to deallocate the socket and
descriptor.
Related Functions
See also accept(), socket(), and write().