You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by fogbit <fo...@gmail.com> on 2013/10/08 10:03:43 UTC

read/consume question

Hello.

There is "read" method, we generally we it for deserialization from
transport via a protocol. What does it returns? From what i read from the
sources, it returns actual amount of bytes red from a transport. Am i right?

If i am, can i use this number for TTransport::consume method? I have to
make a sort of "manual" reading from a buffer like:

while(not_buffer_end)
{
  1) read data
  2) move buffer pointer
}

I tried this, but it raises the
TProtocolException(TProtocolException::INVALID_DATA)

Thank you!