Open mpenate-ellenbytech opened 3 months ago
The recent changes involve updating various functions and methods across multiple files to utilize a uint64
hash parameter instead of a message.Token
parameter. This modification aligns the codebase with the CoAP specification, ensuring that blockwise requests are correlated based on message options rather than tokens.
Files | Change Summary |
---|---|
dtls/client.go , dtls/server/server.go , net/client/client.go , udp/client.go , udp/server/server.go |
Updated function signatures to replace message.Token with uint64 hash for handling observation requests. |
message/option.go |
Added Request-Tag option with OptionID 292 and corresponding definitions. |
net/blockwise/blockwise.go , net/blockwise/blockwise_test.go |
Various modifications related to using uint64 hash instead of message.Token for blockwise operations. |
tcp/client.go , tcp/server/server.go |
Updated function signatures to use uint64 hash instead of message.Token for observation requests. |
Objective | Addressed | Explanation |
---|---|---|
Blockwise requests should be correlated based on message options (#512) | ✅ |
In code's vast sea, a change takes flight,
From tokens to hashes, we set it right.
Observations flow with options clear,
A smoother path, no need to fear.
Withuint64
our guide, we stride,
Through blockwise realms, with specs beside.
🌟🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Fixed linting issues.
I should add that I am not a golang programmer, and addressing test failures will be difficult without any help. I can ask a colleague for some of their input but direct help would be appreciated.
Credit to @zworks-okada for initial work regarding rx transfers. Expanded to include tx.
Closes #512
Needs more thorough testing than what I was able to do. Willing to help address concerns.
Summary by CodeRabbit
New Features
Request-Tag
option for enhanced request handling.Refactor
hash uint64
instead ofmessage.Token
for observation requests, improving consistency and performance.Client
andServer
structs for better data handling.Improvements
RemoteAddr()
method to client interfaces for better address handling.These changes streamline observation request processing and enhance the overall efficiency of the application.