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

provide a way to set DEFAULT_BLOCK_SIZE_EXP and other values in Context #31

Open
ealfie opened this issue Dec 9, 2015 · 2 comments
Open

Comments

@ealfie
Copy link

ealfie commented Dec 9, 2015

It would be useful if there is a kind of DEFAULT_SIZE_EXP for the aiocoap.Context class, so it is easier to configure this value using inheritance.

There may be other constants, that could be useful to configure in this way.

I can make a pull request if you want.

@chrysn chrysn changed the title provide a way to set DEFAULT_SIZE_EXP and other values in Context provide a way to set DEFAULT_BLOCK_SIZE_EXP and other values in Context Mar 17, 2016
@chrysn
Copy link
Owner

chrysn commented Mar 31, 2016

With the introduction of multi-endpoint contexts in #34, the default size should probably go somewhere in the TransportEndpoint, maybe even piggy-back with the fill_remote / have the default block size accessible via the remote. If you want to send a pull request, feel free (just post a note here if you start working on it to avoid duplicate effort).

@chrysn
Copy link
Owner

chrysn commented Apr 10, 2017

Not really a fix for the issue, but should be mentioned here anyway: In the current master, a blockwise managed application can set a Block1 option on requests or a Block2 option on a response; the block number will be discarded by the block handling mechanism, but the block size will be used for block size negotiation.

This allows at least application-level workarounds until a good solution is found (possibly bookkeeping of which endpoints negotiated which block sizes that can be pre-populated for known limited endpoints).

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

No branches or pull requests

2 participants