The generic function stream-listen
is used by listen
and returns t
if there is input available. The default method uses stream-read-char-no-hang
and stream-unread-char
. Most streams should define their own method as this is usually trivial and more efficient than the method provided.