Does asio support the WIN RIO (Registered I/O) API?
For me, it seems like that ASIO does not support the RIO API. But this is crucial to receive millions of UDP packages, without overwhelming the CPU, since the default WINSOCK2 API will only receive one UDP package from the kernel. No matter which size is configured.
Agreed
Is there a point in still going straight for RIO, or is the expectation that socket support will eventually be adopted within ioringapi (#1200) ? Considering that both have essentially the same API design, yet incompatible types.
Apart from that - the documentation is a little bit on the unclear side, respectively the guarantees made by the API not quite on-par with IOCP:
You can link RIO with IOCP, but you can use only a single OVERLAPPED struct for the entire queue? So you have to go via a pointer in RIORESULT instead? Not an issue, just meaning that it's actually an entirely distinct code path.
The RIO API is not thread-safe (except for multi-threaded pure commit - but not for actual submission of work to queues)?
Furthermore, threaded access to any of the regular Winsock APIs appears to become dangerous as well when RIO is being used:
Synchronization is also required if multiple threads issue sends and receives on the same socket because the send and receive operations use the socket’s request queue. -- RIODequeueCompletion
There are only any significant performance gains (the mentioned multi-million PPS) when using a threading concept where one (single) thread is submitting deferred calls and potentially de-queuing, while another thread has to take the perf hit of committing the input queue in a busy loop?