WSASend 的一个小问题,谢谢
WSASend调用的时候,要给他一个char* 的buf,调用完了,是不是马上可以把
这个buf清掉,或者删掉(delete)?
如果这样的话,底层的缓冲区满了,会怎么样?返回一个错误?什么样的错误?
MSDN里面有一句话
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.
但是它只是说了WSABUF这个结构可以马上清掉,没说里面的buf也可以马上清掉啊!
小小问题,大家多多指点