Skip to content
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 Support #7

Open
JonGretar opened this issue Feb 17, 2017 · 1 comment
Open

Multicast Support #7

JonGretar opened this issue Feb 17, 2017 · 1 comment

Comments

@JonGretar
Copy link

Multicast support would be a great for a setup I am planning here at home.

The server part is simple. Just adding the option {add_membership, {{224, 0, 1, 187}, {0,0,0,0}}} to gen_udp:open/2 when we want the server to accept multicast requests. Seems to work fine when I test it. Although I will have to read the rfc a bit better to see if more is required to be spec complete.

The problem arises with the client code in a few areas.

  • How the channels work causes problem because the reply comes from a different ip address than the one that the message was sent from.
  • It might get multiple replies from different ip addresses.
  • Not sure how to route the incoming messages to the correct client request reply.

I'll be happy to code something up and send a pull request. Just wanted to start with a discussion on how it could operate.

@gotthardp
Copy link
Owner

Although the client uses channels, each client opens just a single channel. The multiplexing logic is used only for the server. Therefore, the client channel should be fine, even if the source of a response is different.

Much worse is the problem with multiple responses. This affects the coap_transport. The RFC7390 says that "ACK" is never sent in response to multicast. I am tempted to say that multicast should be supported for NON-reliable only. If we say this, a solution to this problem could be a dedicated section in coap_transport handling multicast-non requests as described in the RFC. (NON is much simpler than CON.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants