Can you send a file larger that the SendBufferSize throuh a TcpClient?

核能气质少年 提交于 2019-12-04 13:08:57

From MSDN:

If the network buffer is smaller than the amount of data you provide the Write method, several network send operations will be performed for every call you make to the Write method.

You only need to call Write once, the TcpClient will handle splitting it into multiple network operations.

If the network buffer is smaller than the amount of data you provide the Write method, several network send operations will be performed for every call you make to the Write method. You can achieve greater data throughput by ensuring that your network buffer is at least as large as your application buffer.

from .NET Framework Class Library - TcpClient.SendBufferSize Property

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!