I have seemed to fix the reading issues on the C++ and Java sides and
it is working as expected.

My only concern now is in regards to messages sizes and the prepending
the size at the beginning.  What is the best way to go about this?  My
test message required on one byte but my next messages will probably
require 2 if not 3  bytes.  What is the proper way to handle this in
the C++ code as the Java code has this built-in?

In addition, my colleague has used Thrift before and was extremely
surprised that the C++ classes did not have matching function calls in
Java and vice versa.  Can someone explain this short coming?

Thanks,
Kevin

On Oct 21, 11:28 am, Evan Jones <ev...@mit.edu> wrote:
> On Oct 21, 2010, at 1:21 , Kevin wrote:
>
> > Basically, the code that receives the data will wait until the stream
> > is closed before reading the data.  I thought that flushing the data
> > would cause the data to be sent but that apparently has no effect.  Is
> > this my implementation or a problem with using the writeTo
> > function?
>
> The flush *should* be causing the data to be sent. The problem is on  
> the reader side: the default read methods read until the end of the  
> stream. You'll need to prepend a length. You may want to use  
> parseDelimited(). See the following document, or search the archives  
> for many conversations about this. Hope this helps,
>
> Evan
>
> http://code.google.com/apis/protocolbuffers/docs/techniques.html#stre...
>
> --
> Evan Joneshttp://evanjones.ca/

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to