In contrast to read(), readsome() reads all available characters of the stream buffer, using the
in_avail() member function of the buffer (see Section 15.13.1, page 827). This is useful when
it is undesirable to wait for the input because it comes from the keyboard or other processes.
Encountering end-of-file is not considered an error and sets neither eofbit nor failbit.