Kevin wrote:
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?
If you want to use parseDelimited on the Java side, you must use CodedOutptuStream::WriteVarint32() on the C++ side. See this recent thread for some code that should do the trick:
http://groups.google.com/group/protobuf/browse_thread/thread/3af587ab16132a3f
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?
Someone added it as a convenience method to the Java implementation. No one has yet added it to the C++ implementation. I think mostly because protocol buffers are a fairly "low level" library, and other people wrap them in many different ways. However, this is probably just an oversight: if the Java side has parseDelimited/writeDelimited, the other implementations probably should as well.
Evan -- Evan Jones http://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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
