shamblett / coap

A Coap package for dart
Other
16 stars 13 forks source link

feat: add experimental CoAP server implementation #134

Open JKRhb opened 1 year ago

JKRhb commented 1 year ago

I started working on a simple, experimental server implementation (which currently only supports UDP). For now, this is only a proof-of-concept, which can be improved upon once #127 has been merged.

JosefWN commented 1 year ago

Cool!

Speaking of which, it would be really cool with integration tests against a server in the build pipeline/GitHub Actions. Re-writing our examples as integration tests and running them on push to a branch with an open PR... I was a bit hesitant to do this with coap.me or Californium since they are external and any issues with them would cause our pipelines to fail. Also having a third-party server like Coap.NET in our repo felt wrong.

It could be a lot of work to cover all examples, but even some would be a big win. Another option is to run them against Californium, which seems to be the best maintained, and allow for merging on failure if that's possible (or force merge on temporary issues).

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 1.16% and project coverage change: -0.47 :warning:

Comparison is base (c6f2bb1) 29.91% compared to head (e854831) 29.45%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #134 +/- ## ========================================== - Coverage 29.91% 29.45% -0.47% ========================================== Files 62 63 +1 Lines 2811 2855 +44 ========================================== Hits 841 841 - Misses 1970 2014 +44 ``` | [Impacted Files](https://app.codecov.io/gh/shamblett/coap/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steve+Hamblett) | Coverage Δ | | |---|---|---| | [lib/src/coap\_client.dart](https://app.codecov.io/gh/shamblett/coap/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steve+Hamblett#diff-bGliL3NyYy9jb2FwX2NsaWVudC5kYXJ0) | `0.00% <0.00%> (ø)` | | | [lib/src/coap\_constants.dart](https://app.codecov.io/gh/shamblett/coap/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steve+Hamblett#diff-bGliL3NyYy9jb2FwX2NvbnN0YW50cy5kYXJ0) | `0.00% <0.00%> (ø)` | | | [lib/src/coap\_message.dart](https://app.codecov.io/gh/shamblett/coap/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steve+Hamblett#diff-bGliL3NyYy9jb2FwX21lc3NhZ2UuZGFydA==) | `46.63% <ø> (ø)` | | | [lib/src/coap\_observe\_client\_relation.dart](https://app.codecov.io/gh/shamblett/coap/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steve+Hamblett#diff-bGliL3NyYy9jb2FwX29ic2VydmVfY2xpZW50X3JlbGF0aW9uLmRhcnQ=) | `0.00% <0.00%> (ø)` | | | [lib/src/coap\_request.dart](https://app.codecov.io/gh/shamblett/coap/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steve+Hamblett#diff-bGliL3NyYy9jb2FwX3JlcXVlc3QuZGFydA==) | `37.14% <0.00%> (ø)` | | | [lib/src/coap\_server.dart](https://app.codecov.io/gh/shamblett/coap/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steve+Hamblett#diff-bGliL3NyYy9jb2FwX3NlcnZlci5kYXJ0) | `0.00% <0.00%> (ø)` | | | [lib/src/stack/layers/observe.dart](https://app.codecov.io/gh/shamblett/coap/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steve+Hamblett#diff-bGliL3NyYy9zdGFjay9sYXllcnMvb2JzZXJ2ZS5kYXJ0) | `0.00% <0.00%> (ø)` | | | [lib/src/option/uri\_converters.dart](https://app.codecov.io/gh/shamblett/coap/pull/134?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Steve+Hamblett#diff-bGliL3NyYy9vcHRpb24vdXJpX2NvbnZlcnRlcnMuZGFydA==) | `67.12% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.