+ /*
+ * Read `size` bytes from the underlying file descriptor, assuming
+ * raw_fd behaves as a blocking device.
+ *
+ * Throws an exception if the requested amount of bytes couldn't be read.
+ */
+ void read(void *buffer, std::size_t size);
+ /*
+ * Write `size` bytes to the underlying file descriptor, assuming
+ * raw_fd behaves as a blocking device.
+ *
+ * Throws an exception if the requested amount of bytes couldn't be written.
+ */
+ void write(const void *buffer, std::size_t size);
+
+ int fd() const noexcept;
+
+protected:
+ void _cleanup() noexcept;
+
+private: