![]() |
VOOZH | about |
dotnet add package Makaretu.Dns.Multicast.New --version 0.38.0
NuGet\Install-Package Makaretu.Dns.Multicast.New -Version 0.38.0
<PackageReference Include="Makaretu.Dns.Multicast.New" Version="0.38.0" />
<PackageVersion Include="Makaretu.Dns.Multicast.New" Version="0.38.0" />Directory.Packages.props
<PackageReference Include="Makaretu.Dns.Multicast.New" />Project file
paket add Makaretu.Dns.Multicast.New --version 0.38.0
#r "nuget: Makaretu.Dns.Multicast.New, 0.38.0"
#:package Makaretu.Dns.Multicast.New@0.38.0
#addin nuget:?package=Makaretu.Dns.Multicast.New&version=0.38.0Install as a Cake Addin
#tool nuget:?package=Makaretu.Dns.Multicast.New&version=0.38.0Install as a Cake Tool
Forked from https://github.com/richardschneider/net-mdns to update dependencies and continue development.
A simple Multicast Domain Name Service based on RFC 6762. Can be used as both a client (sending queries) or a server (responding to queries).
A higher level DNS Service Discovery based on RFC 6763 that automatically responds to any query for the service or service instance.
Note: The DNS-SD client does not have flood protection implemented for backwards compatability. We recommend using Tiny DNS for a fully standards compliant client if a server is not needed. If a server is needed this implementation works well.
Published releases are available on NuGet. To install, run the following command in the Package Manager Console
PM> Install-Package Makaretu.Dns.Multicast.New
or using .NET CLI run the following command in the project folder
> dotnet add package Makaretu.Dns.Multicast.New
Always broadcast the service ("foo") running on local host with port 1024.
using Makaretu.Dns;
var service = new ServiceProfile("x", "_foo._tcp", 1024);
var sd = new ServiceDiscovery();
if (sd.Probe(service))
// Handle the service conflict
else
{
//Begin responding to queries for this service
sd.Advertise(service);
//Notify listeners that the service is now available
sd.Announce(service);
}
See the for a working program.
Find all services running on the local link.
using Makaretu.Dns;
var sd = new ServiceDiscovery();
sd.ServiceDiscovered += (s, serviceName) => { // Do something };
Find all service instances running on the local link.
using Makaretu.Dns;
var sd = new ServiceDiscovery();
sd.ServiceInstanceDiscovered += (s, e) => { // Do something };
See the for a working program.
Get all the Apple TVs. The query is sent when a network interface is discovered.
The AnsweredReceived callback contains any answer that is seen, not just the answer
to the specific query.
using Makaretu.Dns;
var mdns = new MulticastService();
mdns.NetworkInterfaceDiscovered += (s, e) => mdns.SendQuery("appletv.local");
mdns.AnswerReceived += (s, e) => { // do something with e.Message };
mdns.Start();
Get the first answer to Apple TVs. Wait 2 seconds for an answer.
using Makaretu.Dns;
var service = "appletv.local";
var query = new Message();
query.Questions.Add(new Question { Name = service, Type = DnsType.ANY });
var cancellation = new CancellationTokenSource(2000);
using (var mdns = new MulticastService())
{
mdns.Start();
var response = await mdns.ResolveAsync(query, cancellation.Token);
// Do something
}
Respond to a query for the service. Note that ServiceDiscovery.Advertise is much easier.
using Makaretu.Dns;
var service = "...";
var mdns = new MulticastService();
mdns.QueryReceived += (s, e) =>
{
var msg = e.Message;
if (msg.Questions.Any(q => q.Name == service))
{
var res = msg.CreateResponse();
var addresses = MulticastService.GetIPAddresses()
.Where(ip => ip.AddressFamily == AddressFamily.InterNetwork);
foreach (var address in addresses)
{
res.Answers.Add(new ARecord
{
Name = service,
Address = address
});
}
mdns.SendAnswer(res);
}
};
mdns.Start();
Copyright © 2018-2019 Richard Schneider (makaretu@gmail.com)
The package is licensed under the MIT license. Refer to the LICENSE file for more information.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 net5.0 was computed. net5.0-windows net5.0-windows was computed. net6.0 net6.0 was computed. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 was computed. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 netcoreapp2.0 was computed. netcoreapp2.1 netcoreapp2.1 was computed. netcoreapp2.2 netcoreapp2.2 was computed. netcoreapp3.0 netcoreapp3.0 was computed. netcoreapp3.1 netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 netstandard2.0 is compatible. netstandard2.1 netstandard2.1 was computed. |
| .NET Framework | net461 net461 was computed. net462 net462 is compatible. net463 net463 was computed. net47 net47 was computed. net471 net471 was computed. net472 net472 was computed. net48 net48 was computed. net481 net481 is compatible. |
| MonoAndroid | monoandroid monoandroid was computed. |
| MonoMac | monomac monomac was computed. |
| MonoTouch | monotouch monotouch was computed. |
| Tizen | tizen40 tizen40 was computed. tizen60 tizen60 was computed. |
| Xamarin.iOS | xamarinios xamarinios was computed. |
| Xamarin.Mac | xamarinmac xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos xamarinwatchos was computed. |
Showing the top 5 NuGet packages that depend on Makaretu.Dns.Multicast.New:
| Package | Downloads |
|---|---|
|
Tecan.Sila2.Grpc
The common gRPC implementation of the Tecan SiLA2 SDK |
|
|
Tecan.Sila2.Client
The client base library of the Tecan SiLA2 SDK |
|
|
Tecan.Sila2.NetCore
The common gRPC implementation of the Tecan SiLA2 SDK |
|
|
Tecan.Sila2.Client.NetCore
The client base library of the Tecan SiLA2 SDK using managed gRPC |
|
|
VL.OCIO
OpenColorIO (OCIO) 2.5 integration for vvvv with built-in ACES 2.0 color space support. Includes HDRGrade (color grading) and HDRTonemap (tonemapping) TextureFX shaders with web-based UI. |
This package is not used by any popular GitHub repositories.