




The function socket-stream-shutdown performs a shutdown on one or both sides of a TCP socket connection of stream, which can indicate to the peer that no more data will be sent or received.
When direction is :input, receive operations are shut down. When direction is :output, send operations are shut down. When direction is :io, all operations are shut down.
If abort is true and direction is :output or :io, then any input or output in the socket stream buffers is discarded. Otherwise output is flushed and input is left in the buffer.
It is an error to read from stream (after no data is left in the buffer) after shutdown for :input or :io or to write to stream after shutdown for :output or :io.
socket-stream-shutdown does not close the socket stream, so it is still necessary to call close to free resources associated with the stream.
LispWorks User Guide and Reference Manual - 20 Sep 2017