Is there a UPnP Library for .NET (C# or VB.NET)? [closed]

江枫思渺然 提交于 2019-11-26 18:27:58

There is a COM library that's easy enough to access:

UPnP APIs Purpose

The UPnP™ framework enables dynamic networking of intelligent appliances, wireless devices, and PCs. There are two APIs for working with UPnP-certified devices:

The Control Point API, which consists of a set of COM interfaces used to find and control devices. The Device Host API, which consists of a set of COM interfaces used to implement devices that are hosted by a computer.

I have a written a fully Managed UPnP library around the microsoft UPnP Control Point COM objects, its available with full source and a demo project, you can download it from CodePlex here:

http://managedupnp.codeplex.com/

It supports full traversal of the UPnP description documents using an object heirachy and among other things is very easy to use.

Mono.Nat is a pretty good library for upnp, at least for my case I had less issues with it so far than when I was using NATUPnP.

You can download it here and you can find a decent tutorial on how to operate it at http://www.fluxbytes.com/csharp/upnp-port-forwarding-the-easy-way/

This Intel UPnP tools have been re-released as open source tools at: http://opentools.homeip.net. The new tools are called the "Developer Tools for UPnP technologies". They are built in C# but there is a free code generator that will output C and C# stacks. The C stack will work on Windows and Linux.

Ylian

Was looking around for this stuff personally and found::

mono-upnp:: https://github.com/mono/mono-upnp

Mono.Nat:: https://github.com/mono/Mono.Nat

I use this, which seems to work fine:

http://code.google.com/p/dotnetportmapper/

Intels UPNP Tools used to be able to export UPnP clients in C#. The suite is deprecated but ought still work.

If someone needs an easy library, I wrote a c# class library that uses the UPnPLib COM component. It has some basic functions to open and close ports. I haven't tested it on multiple platforms yet, but it works on Visual Studio 2010 in Windows 7. Feel free to download it at http://sourceforge.net/projects/easyupnp/

For NAT specifically there is Mono.Nat.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!