Windows套接字 - WSASend多个WSABUF的内部工作? [英] Windows Sockets - WSASend multiple WSABUF's internally work?

查看:141
本文介绍了Windows套接字 - WSASend多个WSABUF的内部工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道WSASend在处理多个WSABUF缓冲区时如何在内部工作。



是否循环遍历每个,只发送当前缓冲区内的数据?



在发送之前它是否将所有数据合并在一起?



另一种方法?



我使用Overlapped。



I would like to know how WSASend works internally when dealing with multiple WSABUF buffers.

Does it loop through each, sending only the data inside the current buffer?
Or
Does it combine all the data together before sending?
Or
Another method?

I am using Overlapped.

int nBytesSent = WSASend(Socket, (WSABUF*)Buf, BufferCount, &NumberOfBytesSent, 0, &Overlapped, NULL);

推荐答案

好的,请阅读http://msdn.microsoft.com/en-us/library/windows/desktop/ms742203%28v=vs.85%29.aspx [ ^ ],如果有耐心的话,哟你可以到达写入的地方:



但是,保证发布的缓冲区按照它们指定的顺序发送。



显然,没有其他任何意义。
Well, please read http://msdn.microsoft.com/en-us/library/windows/desktop/ms742203%28v=vs.85%29.aspx[^] , and if are patient enought, you can reach point where it is written:

"However, the posted buffers are guaranteed to be sent in the same order they are specified."

Obviously, nothing else would make sense.


这篇关于Windows套接字 - WSASend多个WSABUF的内部工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆