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

Add encoding and decoding of TURN methods #52

Merged
merged 1 commit into from
Feb 28, 2017
Merged

Add encoding and decoding of TURN methods #52

merged 1 commit into from
Feb 28, 2017

Conversation

arkgil
Copy link
Contributor

@arkgil arkgil commented Feb 28, 2017

Included methods: Allocate, Refresh, Send, Data, CreatePermission,

Addressed issues: #51 #39 #38 #37 #36

@arkgil
Copy link
Contributor Author

arkgil commented Feb 28, 2017

@mentels please take a look when you're free.

@@ -105,35 +105,29 @@ defmodule Jerboa.Format.HeaderTest do
end
end

describe "Header.*.encode/1" do
test "Header.Length.encode/1 encodes length into 16 bits (two bytes)" do
Copy link
Contributor

Choose a reason for hiding this comment

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

on 16 bits

assert <<0, 4>> = x
end
assert 16 === bit_size x
assert <<0, 4>> = x
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to have an assertion like <<4 :: size(16)>> = x. It captures both, doesn't it?

Implementation added for all TURN methods except
ChannelBind.
@mentels mentels merged commit 6ac0e61 into master Feb 28, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants