您可以通过 TcpClient 发送大于 SendBufferSize 的文件吗?
我正在试验 .NET 中的 Tcp 连接,我想发送一些大于 TcpClient 对象的 SendBufferSize 比例的数据。是否可以通过简单地写入网络流来发送数据,或者我是否需要将其切成小块并发送这些数据,然后在另一端再次创建它?
I am experimenting with the Tcp connections in .NET and I would like to send some data that is larger than the SendBufferSize proporty of the TcpClient object. Is it possible to send the data by simply writing to the network stream or do I need to cut it in pices and send those and at the other end create it again?
来自 MSDN:
您只需要调用 Write 一次,TcpClient 将处理将其拆分为多个网络操作。
From MSDN:
You only need to call Write once, the TcpClient will handle splitting it into multiple network operations.