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

Use new msgpack package #65

Merged
merged 5 commits into from
Aug 28, 2018

Conversation

gernest
Copy link
Contributor

@gernest gernest commented Aug 28, 2018

This PR introduces github.com/ugorji/go/codec as mspack encoder/decoder

These functions are used to encode and decode msgpack using
github.com/ugorji/go/codec library
Use []byte instead of string, codec seems to support []byte and defaults
to it for strings
@gernest gernest changed the title New msgpack package Use new msgpack package Aug 28, 2018
Copy link
Contributor

@ORBAT ORBAT left a comment

Choose a reason for hiding this comment

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

Minor comments only. Looks good!

@@ -90,7 +90,7 @@ func checkUnique(ch chan string, typ string, n int) error {
}

func TestRealtimeClient_50clients(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Might as well rename the test

"bytes"
"io"

"github.com/ugorji/go/codec"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be vendored

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, not in this PR. I plan to make Godep directory go away by the time we integrate the integration branch to develop and use the new go module to manage dependencies.

But that work will be done later.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, makes sense

@ORBAT
Copy link
Contributor

ORBAT commented Aug 28, 2018

As a note, this PR was necessary because the original msgpack decoder would only decode double values to a float64, so e.g. 1 would fail to decode

Copy link
Contributor

@ORBAT ORBAT left a comment

Choose a reason for hiding this comment

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

Great, looks good. Thank you

@ORBAT ORBAT merged commit 8205a5d into ably:intergation-spec-1.1 Aug 28, 2018
@gernest gernest deleted the new-msgpack-package branch August 28, 2018 13:16
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.

2 participants