socket-control

$Revision: 1.1.2.3 $

Generic Function

Package: ACL-SOCKET

Arguments: (stream &key output-chunking output-chunking-eof input-chunking)

This function modifies the state of the socket stream.

If specified, the output-chunking argument controls whether the chunking protocol will be used for output on this socket (yes if true, no if nil). If this argument is not specified, output chunking is not affected. Note that if there is data still in the output buffer for this socket stream and chunking is turned on, then the the chunking protocol will be applied to the data in the buffer when it is eventually written to the socket. Therefore you may want to call force-output before turning on chunking.

If output-chunking-eof is true then this occurs:

  1. a force-output is done to flush the socket output buffer.
  2. a zero sized chunk message is sent to the socket, which causes the process at the other end of the socket connect to interpret this as an chunking end of file.
  3. chunking for this socket is turned off (as if socket-control were called with :output-chunking nil)

If specified, the input-chunking argment controls whether data being read from the socket is interpreted as chunked data (yes if true, no if nil). If this argument is not specified, input chunking is not affected.

When input chunking is enabled a chunk end of file will cause the reading function (read-byte, read-char, read-sequence) to return just as if a real end of file was reached. In order to distinguish a real end of file from a chunking end of file, when a chunking end of file occurs the socket code will signal the condition excl::socket-chunking-end-of-file with the format-arguments slot being a list whose sole member is the stream that received the chunking end of file. This condition is not an error or warning, thus if it isn't caught Lisp will simply ignore it.

See socket.htm for general information on sockets.

The general documentation description is in introduction.htm. The index in index.htm.

Copyright (C) 1998-1999, Franz Inc., Berkeley, CA. All Rights Reserved.