I would like a precision with WSARecv.
Basically it seems you can use the function with an array of WSABUFs.
1- In an overlapped I/O context WITHOUT completion ports, say I use WSARecv() on a datagram socket with an array of 48 WSABUFs, does it means I can receive 48 different UDP packets (1 packet for each buffer) in a single call (say they arrive at the same exact moment)? Or is the only way to receive the 48 packets is to use WSARecv() 48 times after the event has been signaled (using overlapped I/O with events but not completion ports, I repeat).
2- In a context WITH I/O completion ports/overlapped I/O, does it means I can replace this
int n = 48;
for (int i = 0; i < n; i++)
WSARecv(sock, &buffer_array[i], 1, NULL, 0, &overlapped, completion_routine);
With this?
WSARecv(sock, buffer_array, 48, NULL, 0, &overlapped, completion_routine);
Basically does it mean's calling WSARecv() with 48 buffers will post 48 read requests?
3- If not, what is the purpose of an array of WSABUF's? I mean, only one of correct size suffice no?
Thanks a lot!