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

protocol.py: Take block1.size_exponent from option if it exists #44

Closed

Conversation

nenadilic84
Copy link
Contributor

This will allow a CoAP client to set the transfer block size doing
something like: msg.opt.block1 = (0, True, 2), where 2 is the
size_exponent, which will result in 64 byte block size.

Signed-off-by: Nenad Ilic nenadilic84@gmail.com

This will allow a CoAP client to set the transfer block size doing
something like: msg.opt.block1 = (0, True, 2), where 2 is the
size_exponent, which will result in 64 byte block size.

Signed-off-by: Nenad Ilic <nenadilic84@gmail.com>
@nenadilic84
Copy link
Contributor Author

@chrysn, I opened this PR as I was having issue setting the block size. If you think this can be solved some other way, let me know.

@chrysn
Copy link
Owner

chrysn commented Nov 17, 2016

Thanks, this looks useful as it provides the sender to explicitly set a per-messge size; for the general request of having a generically configurable default size, it provides a workaround.

I've added an additional check that no non-zero block offsets could be injected via that; it could still be supported, but right now it's a potential cause of confusion.

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

2 participants