gpt4 book ai didi

c# - 您可以通过 TcpClient 发送大于 SendBufferSize 的文件吗?

转载 作者:可可西里 更新时间:2023-11-01 02:33:43 25 4
gpt4 key购买 nike

我正在 .NET 中试验 Tcp 连接,我想发送一些大于 TcpClient 对象的 SendBufferSize proporty 的数据。是否可以通过简单地写入网络流来发送数据,或者我是否需要将其切成小块并发送,然后在另一端重新创建?

最佳答案

来自 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.

您只需调用 Write 一次,TcpClient 会将其拆分为多个网络操作。

关于c# - 您可以通过 TcpClient 发送大于 SendBufferSize 的文件吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3097695/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com