Cross platform file_io
This branch implements the changes need to the file_io
component to support asynchronous I/O operations for the Windows platform.
In summary, the main component src/util/file_io.cpp
is now a simple conditional structure to load with #ifdef
a posix.cpp
or windows.cpp
implementation.
The signature of all the file_io
methods remains the same, and only a few internal/utility methods were added to the Windows implementation.
async_file_handle
and native_handle_t
are aliases to avoid direct references to Posix types and to allow the usage of native Windows types.
The component src/util/file_io/random_access_handle_extended.hpp
is key for the Windows implementation, as it adds the missing methods async_read_some
and async_write_some
to the random_access_handle
class in order to keep unmodified the existent Ouinet code that is using file_io
.