Closed DXist closed 1 year ago
What is it for? Could you provide an example?
For example, a driver client doesn't use compio::fs::File
abstraction and works with files using only driver operations - like Open, ReadAt, WriteAt, Close operations. The clients File abstraction holds RawFd and reset it to invalid value before file is open or after Close operation is submitted.
In case of Linux/io_uring it's even possible to use only direct descriptors but it could be conditionally compiled into client depending on platform.
Similarly Socket could be used only for bind/listen operations and then transformed back to RawFd.
That's not the goal of this repo.
This PR adds INVALID_FD constant - clients could use it as a default value for unitialized file descriptor