Need an async I/O Processing
Plan to use async I/O through aio* calls on Linux
The situation:
I have opened socket with AF_INET and SOCK_STREAM flags (TCP)
Have limit high watermark for send buffers
Want to write to that socket asynchronously, and when send buffer overflows, want to disconnect an socket
So, I have questions:
-
When I made async call to aio_write on TCP socket, when I/O completion will arrives – when buffer written out into socket buffer or delivery is confirmed? How I can manage this behavior?
-
How’s best to handle this with lio_listio techniques
Regards,
Andrew
You want to avoid AIO on Linux for anything real, at least for now, From
aio(7):Instead, look into non-blocking IO with
select(2)/poll(2)/epoll(7).