Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / WSASend Documentation

Author
Message
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 10th Jul 2008 21:43
Quote: "The array of WSABUF structures pointed to by the lpBuffers parameter is transient. If this operation is completed 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."


That is from the WSASend winsock documentation on MSDN. What exactly does it mean? Is it saying that the WSABUF structure and allocated memory to the structure are deleted after WSASend is completed?

Link to documentation: http://msdn.microsoft.com/en-us/library/ms898766.aspx
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 11th Jul 2008 21:03
It talks about the 'service provider' which is the overlapped handler (or the network driver in this case). It's basically saying that the writer of the driver is responsible for taking a copy of the array before the WSASend function is allowed to return because that array may get immediately cleaned up by user code (your code) after it returns, such as by using local stack-based arrays.

Login to post a reply

Server time is: 2024-09-30 01:37:45
Your offset time is: 2024-09-30 01:37:45