Hello @Bogdan Vasilescu ,
The array of WSABUF structures pointed to by the lpBuffers parameter is transient. If this operation completes in an overlapped manner, it is the service provider's responsibility to capture these WSABUF structures before returning from this call. This enables applications to build stack-based WSABUF arrays.
As for the content of the buf pointer points to, copy or not, it depends on the service provider. The general rule when dealing with buffers and asynchronous IO is that you shouldn’t do any modifying/freeing of the buffer until the asynchronous IO has completed.
What you has been doing so far seems correct.
Thank you!
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.