Scieneer Common Lisp 1.3.9 online documentation

ext:stream-expiration stream[Generic Function]

Return the current time in seconds to expiration of the stream, or nil if there is no expiration time. The returned time is a real number, or nil. The expiration timer is implemented for file descriptor based streams which includes network socket streams, and SSL streams, and also methods are provided for composite stream to return the source or target stream expiration time. When appropriate, user defined composite streams should provide a method to return the source or target stream expiration time. A default method is provided for the class stream that returns nil. See also ext:stream-timeout.

(setf (ext:stream-expiration stream) time)[Generic Function]

Set the time to expiration of the stream. The time is a real number giving the elapsed real time from the current time after which the stream expires. A time of nil disables stream expiration. When the time is exceeded, blocking operations such as read and write generate a sys:io-timeout error. The stream expiration is useful for placing a bound on the time taken for a series of stream operations, whereas the ext:stream-timeout places a bound on individual operations. The timeout on individual operations is effectively reduced to be no greater than then remaining time to expiration. After the stream has expired the expiration time must be reset to successfully continue operations on the stream.

The stream expiration timer is implemented for file descriptor based streams which includes network socket streams, and SSL streams, and also methods are provided for composite stream to set the source and target stream expiration. When appropriate, user defined composite streams should provide a method to return the source or target stream expiration time. A default method is provided for the class stream that does nothing if the new time is nil, otherwise it signals an error.