Honoo.Net.UPnP
1.0.0
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
.NET Framework 4.0
This package targets .NET Framework 4.0. The package is compatible with this framework or higher.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Honoo.Net.UPnP --version 1.0.0
NuGet\Install-Package Honoo.Net.UPnP -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Honoo.Net.UPnP" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Honoo.Net.UPnP --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Honoo.Net.UPnP, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Honoo.Net.UPnP as a Cake Addin #addin nuget:?package=Honoo.Net.UPnP&version=1.0.0 // Install Honoo.Net.UPnP as a Cake Tool #tool nuget:?package=Honoo.Net.UPnP&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Honoo.Net.UPnP
INTRODUCTION
Simple UPnP. Provides port mapping, DLNA e.g..
TODO
More DLNA functions implementation.
CHANGELOG
1.0.0
*First version.
USAGE
NuGet
https://www.nuget.org/packages/Honoo.Net.UPnP/
Namespace
using Honoo.Net;
Example-PortMapping
private static void TestPortMapping()
{
UPnPRootDevice[] devices = UPnP.Discover(2000, UPnP.URN_UPNP_SERVICE_WAN_IP_CONNECTION_1);
UPnPRootDevice router = devices[0];
IUPnPWANIPConnectionService service = router.FindService(UPnP.URN_UPNP_SERVICE_WAN_IP_CONNECTION_1);
//Console.WriteLine(service.GetNATRSIPStatus());
//Console.WriteLine(service.GetExternalIPAddress());
//Console.WriteLine(service.GetStatusInfo());
//Console.WriteLine(service.GetConnectionTypeInfo());
//Console.WriteLine(service.GetGenericPortMappingEntry(1));
try
{
_ = service.GetSpecificPortMappingEntry("TCP", 4788);
}
catch (Exception)
{
service.AddPortMapping("TCP", 4788, IPAddress.Parse("192.168.1.11"), 4788, true, "test", 0);
}
UPnPPortMappingEntry entry = service.GetSpecificPortMappingEntry("TCP", 4788);
Console.WriteLine(entry.Protocol + " " + entry.ExternalPort + " " + entry.InternalClient + ":" + entry.InternalPort);
service.DeletePortMapping("TCP", 4788);
Console.ReadKey(true);
}
Example-DLNA
private static void TestDlna()
{
UPnPRootDevice[] devices = UPnP.Discover(2000, UPnP.URN_UPNP_SERVICE_AV_TRANSPORT_1);
UPnPRootDevice dlna = devices[0];
//Console.WriteLine(((IUPnPMediaRendererDevice)dlna.Device).XDlnaDoc);
IUPnPAVTransportService service = dlna.FindService(UPnP.URN_UPNP_SERVICE_AV_TRANSPORT_1);
//Console.WriteLine(service.GetDeviceCapabilities(0));
//Console.WriteLine(service.GetTransportSettings(0));
//Console.WriteLine(service.GetMediaInfo(0));
//Console.WriteLine(service.GetPositionInfo(0));
//Console.WriteLine(service.GetTransportInfo(0));
//Console.WriteLine(service.GetCurrentTransportActions(0));
// Need setup firewall. Administrator privileges are required.
UPnPDlnaServer server = new UPnPDlnaServer("http://192.168.1.11:8080/");
//string callbackUrl = server.AddEventSubscriber(EventSubscriptionCallback);
//string sid = service.SetEventSubscription(callbackUrl, 3600);
string mediaUrl = server.AddMedia("E:\\Videos\\The Ankha Zone.mp4");
service.SetAVTransportURI(0, mediaUrl, string.Empty);
service.Play(0, "1");
Console.ReadKey(true);
service.Stop(0);
server.Dispose();
//service.RemoveEventSubscription(sid);
}
LICENSE
MIT.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETFramework 4.0
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.