Scieneer Common Lisp 1.3.9 online documentation

ext:stream-read-bytes stream buffer start requested waitp[Generic Function]

Attempt to read the requested number of bytes from the stream into the given buffer starting at start, and returning the number of bytes read or -1 if at the eof-of-file. On pipes or similar devices, this function returns as soon as any data is available, even if the amount read is less than requested and the end-of-file has not been reached. When waitp is true, wait for at least one byte before returning, otherwise return zero if no input is available. The stream input buffer is bypassed. Called by read-bytes when the stream input buffer is empty. See the documentation for read-bytes. Every buffered binary input stream must define a method for this function. When less bytes are read than requested, the function ext:stream-waiting-file-descriptor may be called to find the file descriptor and directions blocked and when ready the function may be called again to continue the operation.