請問, WSASend 和 WSASendTo 這倆函式成功后立即回傳.
問: 發送緩沖區內的資料是不是被拷貝到系統的發送緩沖區之后才回傳的.
倆函式回傳后, 我傳給2個函式的發送緩沖區內的資料, 馬上修改了沒事吧.
uj5u.com熱心網友回復:
lpBuffersA pointer to an array of WSABUF structures. Each WSABUF structure contains a pointer to a buffer and the length, in bytes, of the buffer. This array must remain valid for the duration of the send operation.
如果用了 Overlapped 就得保持到發送結束,
如果沒有用Overlapped ,則是阻塞模式,回傳時就可以再修改
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/90712.html
標籤:網絡編程
上一篇:tensorboard如何使用
