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 enhanced enums for option types, handle unknown option numbers #89

Merged
merged 4 commits into from
May 21, 2022

Conversation

JKRhb
Copy link
Contributor

@JKRhb JKRhb commented May 16, 2022

As mentioned in #80, this PR lets the library use enhanced enums for option types, making the respective code a bit more concise.

While I was at it, I added some additional logic for handling options that are unknown to the client in accordance to RFC 7252, section 4.2. Such options will now be ignored (in the case of elective options) or will cause responses to be rejected (in the case of critical options).

I am looking forward to your feedback :)

// CC @JosefWN

lib/src/coap_message.dart Outdated Show resolved Hide resolved
@JosefWN
Copy link
Contributor

JosefWN commented May 16, 2022

Great work, looks good! Very nice with added type safety and improved readability!

@shamblett shamblett merged commit abeac0e into shamblett:master May 21, 2022
@JKRhb JKRhb deleted the optiontype-enum branch May 21, 2022 11:41
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.

3 participants