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

Add rinfo from the udp response to the service object #13

Merged
merged 3 commits into from
May 7, 2016

Conversation

jlucidar
Copy link
Contributor

@jlucidar jlucidar commented May 6, 2016

I don't know if it is relevant to anyone else than me but I need to access this information for one of my program. (I need to know with which address the server replied).

It does not break anything and passed the tests, though...

Anyway if you want to merge it, it's ready. if you don't, I will continue to use my fork for my project.

jlucidar and others added 2 commits May 6, 2016 14:31
@watson
Copy link
Owner

watson commented May 6, 2016

@jlucidar just to make sure I understand your use-case: You send an mdns query and when you get the response you want to know the IP address of the interface that the remote server responded using?

@jlucidar
Copy link
Contributor Author

jlucidar commented May 6, 2016

correct, I want to know with which address the remote server used to reply.

@watson
Copy link
Owner

watson commented May 6, 2016

@jlucidar hmm it sounds like a very fringe use-case. What do you need it for?

@jlucidar
Copy link
Contributor Author

jlucidar commented May 6, 2016

backward compatibility with a handmade discovery protocol. and being able to apply my own logic to choose the interface I want to talk to (ethernet vs wifi vs usb over ethernet, etc ...) in case of the server being connected to different networks. It is specific, but also a good way to automate discovery and connect over complex network topology.

@watson
Copy link
Owner

watson commented May 6, 2016

@jlucidar So if a service is a member of both en0 and en1 and have two difference IP's, you want to know the interface that was used to respond to the mdns query? (in case that the dns server is actually the same as the service)

@jlucidar
Copy link
Contributor Author

jlucidar commented May 6, 2016

correct.

@watson
Copy link
Owner

watson commented May 6, 2016

@jlucidar You are aware that it's not given that the responding server is the same as the service it's responding for?

I'm thinking we should call this something more specific that simply rinfo - maybe mdnsRinfo or something, just to make sure users know that this is the rinfo of the mdns responder - not the service (though those are the same in many cases)

@jlucidar
Copy link
Contributor Author

jlucidar commented May 7, 2016

@watson : yes I do. but it doesn't matter in my case.

ok for the changes, I'm making it right now.

@watson
Copy link
Owner

watson commented May 7, 2016

@jlucidar I'm sorry for the back and forth here... just needed to wrap my head around this. After thinking it over and talking to others, I think a better word would be referer. I'll just rename it my self and merge the PR 😃 - Thanks for answering all my silly questions

@watson watson merged commit c9f1f2c into watson:master May 7, 2016
watson added a commit that referenced this pull request May 7, 2016
@watson
Copy link
Owner

watson commented May 7, 2016

@jlucidar It's on npm as v3.5.0 😃

@jlucidar
Copy link
Contributor Author

nice ! thank you :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants