Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoded data can not be deserialized #89

Closed
SergejJurecko opened this issue Jan 10, 2018 · 2 comments
Closed

Encoded data can not be deserialized #89

SergejJurecko opened this issue Jan 10, 2018 · 2 comments

Comments

@SergejJurecko
Copy link

I created a simple project to demonstrate the issue: https://github.com/SergejJurecko/qptest/

If you checkout and try:

make run
make check

It will fail.

if you try creating the same structure with protoc it will work:

make protoc
make check
@SergejJurecko
Copy link
Author

I see I must use mymsg.write_message(&mut writer) instead of writer.write_message(&mymsg). This will work with protoc and other protobuf implementations (namely erlang gpb).

Going through writer will prepend a message size. In what situation is this valid?

@tafia
Copy link
Owner

tafia commented Jan 13, 2018

The names are confusing we should probably change that, I'll have a look.
One is writing the message itself the other one the message plus its length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants