]> git.tdb.fi Git - libs/core.git/blob - source/io/utils.h
Use size_t to represent sizes
[libs/core.git] / source / io / utils.h
1 #ifndef MSP_IO_UTILS_H_
2 #define MSP_IO_UTILS_H_
3
4 #include <cstddef>
5
6 namespace Msp {
7 namespace IO {
8
9 class Base;
10
11 /** Reads data from an object.  Does not return until the requested amount of
12 data is read, regardless of the blocking mode of the object.
13
14 Note: If the data is not immediately available and the object is in non-blocking
15 mode, this function effectively becomes a busyloop until it can get more
16 data. */
17 std::size_t read_all(Base &, char *, std::size_t);
18
19 } // namespace IO
20 } // namespace Msp
21
22 #endif