Closed gilzad closed 5 years ago
Fixes #47
Thanks for all the work. This is a great contribution.
Thanks for the quick merge and for the great support!
It has been a pleasure working with you. Please, feel free to pick another issue!!!
Am I doing something wrong? Albeit my programming skills are on part with a 4th grader.. but..?
I am running this on two virtual machines.. I have a method that advertises and another method that unadvertises.. And I have this program running on two virtual machines running Windows 7 attached to my network (bridged).
I have an android app that scans for multi-cast dns services..
Scenario:
Run programs on both virtual machines.. have one start advertising. Phone sees this. Stop advertising from this virtual machine but leave the program running. Phone sees the service disappear.
Switch to the second virtual machine and advertise. Phone sees this, BUT the ip address is for the first virtual machine. Stop advertising.
Close the program that does the advertise\unadvertise on the first virtual machine.
Switch to the second virtual machine, keeping the program running. Now advertise again. Phone sees the correct ip address of this virtual machine.
void Announce() { var service = new ServiceProfile("Hello", "_http._tcp", 80); var sd = new ServiceDiscovery(); sd.Advertise(service); }
void StopAnnounce() { var sd = new ServiceDiscovery(); var service = new ServiceProfile("Hello", "_http._tcp", 80); sd.Unadvertise(service); sd.Dispose(); }
Nevermind.. I had to do this: (Nice work fellas).. working fine on Dot Net 4.5 as well.
Service Discovery sd; void Announce() { var service = new ServiceProfile("Hello", "_http._tcp", 80); sd = new ServiceDiscovery(); sd.Advertise(service); }
void StopAnnounce() { sd.Unadvertise(); }
Well done.
Next time, please open your own issue instead of addng issue to a PR that is merged.
Sorry!
I did do what I wanted regarding nic selection. Your library is awesome!
public static IEnumerable
.Where(nic => nic.OperationalStatus == OperationalStatus.Up)
.Where(nic => nic.NetworkInterfaceType !=
NetworkInterfaceType.Loopback) //Justin .Where(nic => nic.GetIPProperties().GatewayAddresses.FirstOrDefault() != null) .ToArray();
if (nics.Length > 0)
return nics;
// Special case: no operational NIC, then use loopbacks.
return NetworkInterface.GetAllNetworkInterfaces()
.Where(nic => nic.OperationalStatus ==
OperationalStatus.Up); }
On Fri, Jun 21, 2019 at 4:42 PM Richard Schneider notifications@github.com wrote:
Well done.
Next time, please open your own issue instead of addng issue to a PR that is merged.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/richardschneider/net-mdns/pull/59?email_source=notifications&email_token=AA6CD2LITXN64G3FUUU5T3DP3VDKVA5CNFSM4HVXOVBKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYJU54I#issuecomment-504581873, or mute the thread https://github.com/notifications/unsubscribe-auth/AA6CD2OIHBZF2GQOWOYWMWLP3VDKVANCNFSM4HVXOVBA .
-- Justin Shafer Onsite Dental Systems 7704 Sagebrush Ct. S. North Richland Hills, TX. 76182 (817) 909-4222
Stop commenting on this PR. or I will ban you. Open another issue,
Notifying clients about the removal of a published service (goodbye-message, TTL=0). Tested against Bonjour and Avahi.