close

Closes a connection and deletes a socket descriptor.

Format

#include  <unixio.h>

int close  (s);

Argument

s
A socket descriptor.

Description

This routine deletes a descriptor from the per-process object reference table. If this is the last reference to the underlying object, then it will be deactivated.

See also accept, socket, and write in this section.

Return Values
Indicates success. 
-1  Indicates an error; errno is set to EBADF (The socket descriptor is invalid.)  


Previous Page | Next Page | Table of Contents | Index