Hello!

It's not that I have a problem or anything, I'm just curious.
To be exact:

We know that when using IO Completion Ports (under Windows) a call to WSASend might not complete immediately.
After this call there might be a situation where we need to modify/reuse the data buffer for other tasks.
Now my specific question is:
When I WSASend() some data, what is done INTERNALLY with that buffer's data inside the WSASend()?
Is it being copied to another place in the memory/net-card?
Or does the IOCP system will look at the buffer's memory location a bit later when the actual sending will happen?

I hope the question is clear.

This is why it concerns me:
If later the IOCP system will look into my buffer's area then it means I cannot modify the data inside the buffer, otherwise the IOCP system will send the wrong data.
On the other hand when calling WSASend(), if it copies the buffer's data to it's own space then it means things gets a bit slower when sending, especially when sending lots of data and many times (like in an FTP server).

Another "small" thing - can I alter/choose the behaviour? Like a socket option.


I'm guessing this is a question that should likely be addressed to the MS guys but I'm confident that in this forum there are real "gurus" who know things beyond the standard MSDN documentation (:

Thank you!