DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Interprocess communication using UNIX domain sockets

Closing sockets and discarding queued data (UNIX domain)

When a socket is no longer of use, the process can discard it by calling close(S):

   close(s);
If data is associated with a socket which promises reliable delivery (a stream socket), the system continues to attempt to transfer the data. Data undelivered after a long period of time is discarded. A client process can cause all data queued for transfer to be discarded immediately by calling shutdown(SSC) on the socket before closing it:

shutdown(s, how);

where how is one of:


0
if the user no longer wishes to read data

1
if no more data will be sent

2
if no data is to be sent or received.

Next topic: Connectionless sockets (UNIX domain)
Previous topic: Transferring data via a socket (UNIX domain)

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003