Socket Shutdown

Once a socket is no longer required, the calling program can discard the socket by applying a soclose() call to the socket descriptor. If a reliable delivery socket has data associated with it when a close takes place, the system continues to attempt data transfer. However, if the data is still not delivered, the system discards the data. Should the application program have no use for any pending data, it can use the shutdown() call on the socket prior to closing it.

Topics


[Back: Socket I/O Modes]
[Next: Closing Sockets]