I'm writing a MFC app to implement a client/server scenario and using Win socket for that. I can send/receive a small message e.g. "hello". Also, I tried with buffer of size 1000. However, when I increase its size further, it just hangs. Doesn't even throw any error.

Any idea about what the problem could be? Is there any restriction on the maximum size of buffer I can send/receive in winsock? I'm a newbie in this and never used winsock before.

有帮助吗?

解决方案

The following comment by icabod replies this question.

"The fact that you receive a part of the data, then the remaining part, is covered in my answer to this question. It's basically the way TCP works. – icabod"

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top