chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.97k stars 1.22k forks source link

support for ZeroCopy Send #1560

Open microcai opened 3 days ago

microcai commented 3 days ago

two changes:

  1. use IORING_OP_SENDMSG_ZC instead of IORING_OP_SENDMSG for sending.
  2. support for multislot completion notify.

the proactor nature in asio is very suitable for zero-copy send. since the buffer is assumed to be valid until operation complete.

the only drawback is kernel requirement but this is not an issue. people tent to upgrade their kernel to take advantage of io-uring anyway.