How much data can be stored in network buffer when datareader is used

你离开我真会死。 提交于 2019-12-01 21:14:57

Depending on your setup have a read of this Default Result Set Processing and Multiple Active Result Sets and Rowsets and SQL Server Cursors

Look into TcpClient.ReceiveBufferSize it will tell you how much raw data can be read in one operation.

"The ReceiveBufferSize property gets or sets the number of bytes that you are expecting to store in the receive buffer for each read operation. This property actually manipulates the network buffer space allocated for receiving incoming data.

Your network buffer should be at least as large as your application buffer to ensure that the desired data will be available when you call the NetworkStream.Read method. Use the ReceiveBufferSize property to set this size. If your application will be receiving bulk data, you should pass the Read method a very large application buffer.

If the network buffer is smaller than the amount of data you request in the Read method, you will not be able to retrieve the desired amount of data in one read operation. This incurs the overhead of additional calls to the Read method."

and then read about NetworkStream.Read

At which point you will have a better idea of the complexity of the answer to your question.

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