CLOSE, SCLOSE [ Berkeley Sockets/iX Reference Manual ] MPE/iX 5.0 Documentation
Berkeley Sockets/iX Reference Manual
CLOSE, SCLOSE
NOTE This routine is called sclose for non-POSIX users, and is called
close for POSIX users.
C Interface
int close (s)
int s;
int sclose (s)
int s;
Description
Closes the socket descriptor indicated by s. If this file descriptor is
the last reference to the socket, then it is deactivated. For example,
on the last close of a socket, associated naming information and queued
data are discarded.
The SO_LINGER option of setsockopt can be used to determine what happens
to data queued at the time of the close.
For more information about close or any other POSIX function, refer to
the MPE/iX Developer's Kit Reference Manual, Volume 1.
Return Value
If the call completes successfully, a value of 0 is returned. If the
call is unsuccessful, a value of -1 is returned and errno is set to
indicate the error.
Errors
The following error is returned by close:
[EBADF] The argument s is not a valid descriptor.
See Also
getsockopt, setsockopt
MPE/iX 5.0 Documentation