OrientDB-NET.binary icon indicating copy to clipboard operation
OrientDB-NET.binary copied to clipboard

Reading from network stream

Open sowee15 opened this issue 11 years ago • 1 comments

Hi,

I experienced a problem with certain queries where the stream read from the network was not complete. I think there's a problem with the way you read from the network stream. You're relying on stream.DataAvailable to stop reading from the stream. However, this property indicates if there's something to read at that time, not if the server is done sending data. I fixed the problem by parsing the message sent from the server using your current parsing algorithm, but instead of working on the buffer array, I work directly on the network stream using the sets of methods on BinaryReader. So I stop reading from the stream when the flag in the data indicates that there's nothing else to read.

Let me know if you would like more information.

Thanks!

sowee15 avatar Apr 24 '14 14:04 sowee15

Hi, thanks for finding this out. Can you send a pull request please?

yojimbo87 avatar Apr 27 '14 07:04 yojimbo87