更新时间:2023-11-07 23:50:40
您可以从 TcpClient.ReceiveBufferSize 和 TcpClient.SendBufferSize 。
可用缓冲区的大小会随着接收/确认数据而变化(或不)在TCP级别。
The available buffer sizes will vary as data is received/acknowledged(or not) at the TCP level. TcpClient is blocking by default.
没有数据会由于缓冲区已满而被丢弃,尽管在错误情况下数据也可能被丢弃(例如对等项消失) /崩溃/退出等)
No data will be thrown away as a result of full buffers, though data could be throw away in under error conditions (such as the peer disappears/crashes/exits etc.)