-
Notifications
You must be signed in to change notification settings - Fork 51
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
multicast receive address #101
multicast receive address #101
Conversation
My advice is to add a new function rather than change the existed function. Like recv and recv_from in the UdpSocket. Add a new function will make minimal changes. |
It all relies on the TransportSynchronizer containing |
Maybe you can extend the defination of the packet. I don't think it's appropriate that do this in the client. |
The packet inside coap-lite is the implementation of the RFC message format https://datatracker.ietf.org/doc/html/rfc7252#page-16 |
The source of a packet is an attribute of packet. The Clang CoAP library implement it by this way: https://github.com/obgm/libcoap/blob/develop/include/coap3/coap_io_internal.h#L224 |
It's different naming, but boils down to the same thing. Maybe we could do this in the client use coap_lite::Packet as Message
#[derive(Debug, Clone)]
pub struct Packet {
pub address: SocketAddr,
pub message: Message,
} This would probably make the diff smaller, but would eventually be the same thing. |
I think it's better. A terse word reduce the difficulty of code reader. |
f395d9a
to
cc0c3ee
Compare
Should be in a better state now |
https://github.com/Covertness/coap-rs/actions/runs/9604680590/job/26546238545?pr=101 has error. Please check. |
cc0c3ee
to
759258b
Compare
When using
send_all_coap
and using acreate_receiver_for
receiving all the responses,we had a requirement to also know where the responses came from.
This fixes that, however I'm not really happy with the exact state of this MR yet.
I'm open for suggestions/improvements to implement!