Home | Libraries | People | FAQ | More |
Sometimes you receive a file descriptor or HANDLE from a third party piece of code and you need to insert it as-in into AFIO for use. The solution to this is very simple:
handle
with a custom implementation
for your file descriptor type. In particular, you probably will have
custom close semantics (e.g. don't close, or invoke third party code
to implement close).
async_file_io_dispatcher_base::adopt()
.
This will immediately convert your custom handle type into an async_io_op
suitable for supplying
to read()
,
write()
etc.