All Manuals > LispWorks User Guide and Reference Manual > 32 The COMM Package

NextPrevUpTopContentsIndex

socket-stream-shutdown

Function
Summary

Performs a shutdown on one or both sides of a TCP socket connection.

Package

comm

Signature

socket-stream-shutdown stream direction &key abort

Arguments

stream

A socket-stream.

direction

One of :input, :output or :io.

abort

A generalized boolean.

Description

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.

Notes

socket-stream-shutdown does not close the socket stream, so it is still necessary to call close to free resources associated with the stream.

See also

socket-stream


LispWorks User Guide and Reference Manual - 13 Feb 2015

NextPrevUpTopContentsIndex