X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fio%2Futils.h;fp=source%2Fio%2Futils.h;h=8d4f9dd692c769f86b2a2aea71d4522eec9b7bbf;hp=0000000000000000000000000000000000000000;hb=6e0fd758970bcb5bad5e3f2454b694cc4d7b4b66;hpb=b97d4e9f86e90254ab9edef7ee62a910f6333c78 diff --git a/source/io/utils.h b/source/io/utils.h new file mode 100644 index 0000000..8d4f9dd --- /dev/null +++ b/source/io/utils.h @@ -0,0 +1,20 @@ +#ifndef MSP_IO_UTILS_H_ +#define MSP_IO_UTILS_H_ + +namespace Msp { +namespace IO { + +class Base; + +/** Reads data from an object. Does not return until the requested amount of +data is read, regardless of the blocking mode of the object. + +Note: If the data is not immediately available and the object is in non-blocking +mode, this function effectively becomes a busyloop until it can get more +data. */ +unsigned read_all(Base &, char *, unsigned); + +} // namespace IO +} // namespace Msp + +#endif