Skip to content

Conversation

@pchampio
Copy link
Member

fixes #163: When using StandardMessageCodec, the Flutter Framework encode
the value's size using it's own format:
https://api.flutter.dev/flutter/services/StandardMessageCodec/readSize.html

When the size value is above 254, the format used is unsigned int 16 or
32.

@pchampio pchampio requested a review from GeertJohan June 16, 2019 23:16
@pchampio pchampio self-assigned this Jun 16, 2019
fixes #163: When using StandardMessageCodec, the Flutter Framework encode
the value's size using it's own format:
https://api.flutter.dev/flutter/services/StandardMessageCodec/readSize.html

When the size value is above 254, the format used is **unsigned** int 16 or
32.
@pchampio pchampio force-pushed the fix/msgSizeEncoding branch from 2ac9c3a to 0fa4be9 Compare June 17, 2019 07:54
@GeertJohan
Copy link
Member

GeertJohan commented Jun 17, 2019

The solution seems clear, but we should create writeUint16/writeUint32/readUint16/readUint32 methods that wrap the reading/decoding writing/encoding, just like readInt16 (etc)

Copy link
Member

@GeertJohan GeertJohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code should be moved into readUint* writeUint* methods

@GeertJohan GeertJohan merged commit ba2f2eb into master Jun 17, 2019
@pchampio pchampio deleted the fix/msgSizeEncoding branch June 17, 2019 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

StandardMessageCodec decoding error with long strings

3 participants