-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat!: introcuce _sendWithStreamResponse
and sendMulticast
methods, refactor send and observe implementations
#129
Conversation
bad9dd4
to
5c1b889
Compare
Nice! |
That sounds very good, thank you! :) I'll incorporate it into the PR |
Updated the PR and slightly reworked the example to an actual multicast example with local CoAP nodes. I haven't tested it out yet, but I think it should work ;) I also chose |
sendStream
method, refactor send and observe implementations_sendWithStreamResponse
and sendMulticast
methods, refactor send and observe implementations
Sure, thank you :) I could also rebase this one against the new |
#128 merged |
6e850d1
to
846a348
Compare
Great, thank you :) Then this PR would also be ready to be merged now :) Edit: Made a last-minute adjustment to the new example's documentation, since it is using the "All IPv6 Nodes" multicast address instead of the "All CoAP Nodes" address now. |
Thinking about a more elegant solution for performing multicast requests, I came up with introducing a special
sendStream
method on the client, which does not return a singleFuture<CoapResponse>
but aStream
of responses library users can decide to listen to.With this new API present, I realized that other aspects of the client could be refactored, too, making certain aspects of the client a bit more elegant. This includes the
CoapObserveClientRelation
class, which I refactored into an extension of theStream
class, increasing its usability.All in all, I am quite happy with this new approach which should not only improve the usability for multicast scenarios but of the library as a whole.