|ext:buffer-bytes stream required &optional waitp||[Function]|
Attempt to read the required number of byte into the stream input buffer. When waitp is true, wait for at least the required number of bytes before returning, and return the number of bytes available in the buffer upon success or return -1 if the end of the file is encountered before reading the required number of bytes. When waitp is false, return zero if no further input is currently available in which case 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. The number of required bytes is limited to the buffer length so a short count will be returned once the buffer is full. Note that the ext:stream-in-head may be modified, so the caller must reload it if necessary.