Closed JKRhb closed 1 year ago
I also added a rework for the location options of the CoapResponse
class in the latest commits, reusing code from the URI options. This part of the implementation should now also be a bit more RFC-compliant.
There are still some details from RFC 7252 that should be addressed later, but I think for now this PR should be ready for review/merging.
Base: 30.29% // Head: 29.64% // Decreases project coverage by -0.65%
:warning:
Coverage data is based on head (
c5a19ac
) compared to base (bc091d7
). Patch coverage: 50.96% of modified lines in pull request are covered.
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@shamblett Did you have the chance to look at this PR yet? I think merging it would pave the way for a lot of further improvements. #170, #172, and #174 would also be ready to be merged but might be a bit simpler to review than this one.
Yep OK merged, the discover_resources and get_blockwise examples seem to be hanging now when I run them, this may be my machine here, I'll have a closer look tomorrow.
Yep OK merged, the discover_resources and get_blockwise examples seem to be hanging now when I run them, this may be my machine here, I'll have a closer look tomorrow.
Thank you! But you are right, there seems to be a blockwise issue which I haven't noticed :( I try to come up with a fix as soon as possible :)
Found the cause of the issue and opened #175 as a quick fix.
This PR proposes a rework of the
uri
field within theCoapRequest
class. Before, theUri
was constructed by using individualUri-Host
,Uri-Path
,Uri-Port
, andUri-Query
options.However, I noticed that a request's URI can be set in a much simpler way by simply turning it into a regular field which can then be converted into and from individual URI component options. This enabled me to implement the algorithms described in section 6.4 and section 6.5 of RFC 7252 in two functions, which makes debugging a bit easier. With these changes, the conversion should now be RFC-compliant (again) and slightly easier to maintain.
The new approach also allowed/incentivized me to make a slight (but breaking) API change, adding the URI as a request constructor parameter. Therefore, this PR can also be seen as an intermediate step towards #160, but also towards further API and type-safety improvements.
(CC @shamblett @JosefWN)