richardschneider / net-mdns

Simple multicast DNS
MIT License
232 stars 81 forks source link

MulticastService optimizations #35

Closed eshvatskyi closed 6 years ago

eshvatskyi commented 6 years ago
richardschneider commented 6 years ago

It appears that this PR is not based on the latest bits. The recently sent logic has been removed!

You will need to rebase the PR.

richardschneider commented 6 years ago

@eshvatskyi Good find on NetworkChangedEvent. Is it raised when the laptop wakes up from a sleep?

eshvatskyi commented 6 years ago

@eshvatskyi Good find on NetworkChangedEvent. Is it raised when the laptop wakes up from a sleep?

yes, it is

eshvatskyi commented 6 years ago

It appears that this PR is not based on the latest bits. The recently sent logic has been removed!

You will need to rebase the PR.

done. Also please check GetIPAddresses method, looks like it should be default return only InterNetwork adressses

eshvatskyi commented 6 years ago

@richardschneider I've tried to fix all timeout issues from test, but looks like this is non windows specific issues. Please let me know if you can go thought with me

richardschneider commented 6 years ago

Lots of issues here. I especially don't like breaking the Interface (removing IDisposable) and changing all tests. This means all dependent packages are broken.

I feel that maintaining multiple senders is wrong. Multiple NICs are already suppported (see #15 and #12). If you disagree, please raise an issue describing the problem.

I suggest that you proceeded by creating two new PRs

I do appreciate the work you are doing. Please continue.

eshvatskyi commented 6 years ago

np, but it's not working with multiple nic as expected. when you sending query it's not sent to all subnets, but to first suitable. sender.MulticastLoopback = true; I dont nkow why this is used, this is actually duplicated query to loopback (good for testing not useful in subnets)

richardschneider commented 6 years ago

sender.MulticastLoopback = true; I dont nkow why this is used, this is actually duplicated query to loopback (good for testing not useful in subnets)

MulticastLoopback has nothing to do with the loopback interface. It allows a sender to also receive its sent message. See the docs, A big feature of mDNS is passive monitoring of messages. With loopback, the sending app can respond to its own query without having to write special code to deal with a query from itsself or another.