Generic FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
New since 10.0 release.

stream-input-timeout

Arguments: simple-stream

This generic function returns the input timeout limit for simple-stream, which may be nil (no limit) or a positive integer noting how many seconds to wait for input before erroring because there is no input on the stream. See also the related stream-output-timeout.

Timeouts may be particularly useful for socket streams. The example is for demonstration only and is not recommended:

;; For demonstration only. Do not try this at home!
cl-user(3): (setf (stream-input-timeout *standard-output*) 3)

3
cl-user(4):  ;; we do not type anything and we get an error:
Error: #<stream-error @ #x10000e35692>
  [condition type: stream-error]

Restart actions (select using :continue):
 0: Return to Top Level (an "abort" restart).
 1: Abort entirely from this (lisp) process.
[1] cl-user(5): ;; repeated errors:
Error: #<stream-error @ #x10000e35692>
  [condition type: stream-error]

Restart actions (select using :continue):
 0: Return to Debug Level 1 (an "abort" restart).
 1: Return to Top Level (an "abort" restart).
 2: Abort entirely from this (lisp) process.
[2] cl-user(6): (setf (stream-input-timeout *standard-output*) nil)
    ;; we set the value back.

nil
[2] cl-user(7): :res
cl-user(8):  ;; no more errors.

Copyright (c) 1998-2015, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 10.0. This page is new in the 10.0 release.
Created 2015.5.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
New since 10.0 release.