由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 用WSARecv (overlapped IO) 但是事先不知道接受多少数据, 怎
相关主题
菜鸟求助:怎么自动include header file?[转载] 请问DATAGRID里的BOUNDCOLUMN HEADER可以又有TEXT又有
url header问题How to see the content of a library file
ask a question about compile shared library using libtoolsize of structure
which header file declares ntohs() in c++ ?A function can be history-sensitive??????
HTTP Error 403Question about
为什么这个小程序错了?Question about friend in C++
[合集] Message Queue的问题最初级的白痴C++问题
Re: How to write this makefile?一道面试怪题C++. (转载)
相关话题的讨论汇总
话题: wsarecv话题: 接受话题: io
进入Programming版参与讨论
1 (共1页)
s******n
发帖数: 34
1
用WSARecv但是事先不知道接受多少数据
每个数据包都有一个header,里面包含接下来数据大小。
那在接受方, 是不是要调用两次WSARecv? 第一次接受header大小,
这个接受完成后, 再投递一个WSARecv, 接受数据?
像我所说的那样可以吗?两次WSARecv是不是效率低了?
还是说用recv先peek下,再用一次WSARecv?
谢谢!
1 (共1页)
进入Programming版参与讨论
相关主题
一道面试怪题C++. (转载)HTTP Error 403
how to include header file in other directory?为什么这个小程序错了?
一个简单的小问题[合集] Message Queue的问题
template class instantiation问题Re: How to write this makefile?
菜鸟求助:怎么自动include header file?[转载] 请问DATAGRID里的BOUNDCOLUMN HEADER可以又有TEXT又有
url header问题How to see the content of a library file
ask a question about compile shared library using libtoolsize of structure
which header file declares ntohs() in c++ ?A function can be history-sensitive??????
相关话题的讨论汇总
话题: wsarecv话题: 接受话题: io