English 中文(简体)
在打赢赛中,休夫功能被叫起,而不是收到所有数据时会发生什么情况?
原标题:what happens when the recv function in winsock is called and not all the data has been received?

From what i ve read around about winsock, recv has a tendency to not receive all the data from a sender in a single call. When people say this do they mean, for example, i send 300 bytes from a client and i call recv on the server, it s possible that it could only receive 200 some bytes on it s first call and the buffer will be filled with those 200 bytes? What happens to the last 100 bytes?

此外,我还要说,缓冲太小,例如512个 by或东西,客户寄出600个。 第一次休庭会将缓冲带填充能力,然后又被tes掉最后88条? 如果再次用不同的缓冲,那么这一缓冲的首批88次是数据的其他部分?

and thirdly, if one and two are true, and i receive a whole packet of data in separate buffers, will i have to splice them together into one buffer to start parsing my data out of it?

最佳回答

I m assuming TCP here.

是否有可能只收到200份左右的提要,缓冲将用200份tes子填补?

是的。

最后100位受访者的情况如何?

你们会儿 next。

此外,我还要说,缓冲太小,例如512个 by或东西,客户寄出600个。 第一次休庭会将缓冲带填充能力,然后又被tes掉最后88条?

页: 1

如果再次用不同的缓冲,则第88个由tes子是数据的其他部分吗?

是的。

第三,如果一、二是真实的,一、一、二、一、二、二、三、一、二、二、三、一、二、一、二、三、一、二、一、二、一、三、一、二、一、二、一、三、一、二、一、二、一、三、一、一、二、一、三、一、一、一、四、一、一、一、三、一、一、一、三、一、一、一、一、三、一、一、一、一、一、一、一、一、一、一、一、一、三、一、一、一、三、一、三、一、一、一、一、三、一、一、三、一、一、一、一、一、一,一、三、三、一、一、三、一、一、三、三、三、一、一、一、一、一、一、一、一、一、一、三、一、一、一、一、一、一、一、一、一、一、一、三,

That s up to you. Do you need the data in one contiguous buffer? If so, yes.

问题回答

暂无回答




相关问题
How to read exact number of bytes from a stream (tcp) socket?

In winsock, both the sync recv and the async WSARecv complete as soon as there is data available in a stream socket, regardless of the size specified (which is only the upper limit). This means that ...

AcquireCredentialsHandle returns SEC_E_NO_CREDENTIALS

I created a self-signed certificate (created using OpenSSL) and installed it into the Certificate Store using the Certificates MMC snap-in (CertMgr.msc) on Windows Vista Ultimate. I have managed to ...

Calling Win32 EnumThreadWindows() in C#

I m trying to get a call to EnumThreadWindows working, but I always get a Wrong Parameter-Error, although my code is nearly the same as this example on pinvoke.net. I don t know why this doesn t work: ...

COM Basic links

folks can you provide me the tutorial link or .pdf for learning basic COM?. i do google it.. still i recommend answers of stackoverflow so please pass me.. Thanks

Handling multiple windows WIN32 API

HI I m trying to create an application in the Win32 environment containing more than one window. How do i do that? all the Win32 Tutorials on web i found only showed how to manage one window. How do i ...

Creating a thread in DllMain?

It seems that when a thread is created from within DllMain upon DLL_PROCESS_ATTACH it won t begin until all dll s have been loaded. Since I need to make sure the thread runs before I continue, I get a ...

热门标签