reckfellENGINE

UpnpDevice

Universal Plug and Play (UPnP) device.

On this page
class UpnpDeviceReckfellSharpInherits RefCounted

Universal Plug and Play (UPnP) device.

Universal Plug and Play (UPnP) device. See Upnp for UPnP discovery and utility functions. Provides low-level access to UPNP control commands. Allows to manage port mappings (port forwarding) and to query network information of the device (like local and external IP address and status). Note that methods on this class are synchronous and block the calling thread.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

UpnpDeviceConstructor
# UpnpDevice
C#
public UpnpDevice();

Properties6

DescriptionUrlProperty
# DescriptionUrl
C#
public string DescriptionUrl { get; set; }

URL to the device description.

IreckfellControlUrlProperty
# IreckfellControlUrl
C#
public string IreckfellControlUrl { get; set; }

IDG control URL.

IreckfellOurAddrProperty
# IreckfellOurAddr
C#
public string IreckfellOurAddr { get; set; }

Address of the local machine in the network connecting it to this UpnpDevice.

IreckfellServiceTypeProperty
# IreckfellServiceType
C#
public string IreckfellServiceType { get; set; }

IGD service type.

IreckfellStatusProperty
# IreckfellStatus
C#
public UpnpDevice.IgdStatus IreckfellStatus { get; set; }

IGD status.

ServiceTypeProperty
# ServiceType
C#
public string ServiceType { get; set; }

Service type.

Methods16

AddPortMappingint
# AddPortMapping
C#
public int AddPortMapping(int port, int portInternal = 0, string desc = "", string proto = "UDP", int duration = 0);

Adds a port mapping to forward the given external port on this UpnpDevice for the given protocol to the local machine. See Upnp.AddPortMapping.

Parameters
NameTypeDefault
portint—
portInternalint0
descstring""
protostring"UDP"
durationint0
Returns int
DeletePortMappingint
# DeletePortMapping
C#
public int DeletePortMapping(int port, string proto = "UDP");

Deletes the port mapping identified by the given port and protocol combination on this device. See Upnp.DeletePortMapping.

Parameters
NameTypeDefault
portint—
protostring"UDP"
Returns int
GetDescriptionUrlstring
# GetDescriptionUrl
C#
public string GetDescriptionUrl();
Returns string
GetIreckfellControlUrlstring
# GetIreckfellControlUrl
C#
public string GetIreckfellControlUrl();
Returns string
GetIreckfellOurAddrstring
# GetIreckfellOurAddr
C#
public string GetIreckfellOurAddr();
Returns string
GetIreckfellServiceTypestring
# GetIreckfellServiceType
C#
public string GetIreckfellServiceType();
Returns string
GetIreckfellStatusUpnpDevice.IgdStatus
# GetIreckfellStatus
C#
public UpnpDevice.IgdStatus GetIreckfellStatus();
Returns UpnpDevice.IgdStatus
GetServiceTypestring
# GetServiceType
C#
public string GetServiceType();
Returns string
IsValidGatewaybool
# IsValidGateway
C#
public bool IsValidGateway();

Returns true if this is a valid IGD (InternetGatewayDevice) which potentially supports port forwarding.

Returns bool
QueryExternalAddressstring
# QueryExternalAddress
C#
public string QueryExternalAddress();

Returns the external IP address of this UpnpDevice or an empty string.

Returns string
SetDescriptionUrlvoid
# SetDescriptionUrl
C#
public void SetDescriptionUrl(string url);
Parameters
NameTypeDefault
urlstring—
SetIreckfellControlUrlvoid
# SetIreckfellControlUrl
C#
public void SetIreckfellControlUrl(string url);
Parameters
NameTypeDefault
urlstring—
SetIreckfellOurAddrvoid
# SetIreckfellOurAddr
C#
public void SetIreckfellOurAddr(string addr);
Parameters
NameTypeDefault
addrstring—
SetIreckfellServiceTypevoid
# SetIreckfellServiceType
C#
public void SetIreckfellServiceType(string type);
Parameters
NameTypeDefault
typestring—
SetIreckfellStatusvoid
# SetIreckfellStatus
C#
public void SetIreckfellStatus(UpnpDevice.IgdStatus status);
Parameters
NameTypeDefault
statusUpnpDevice.IgdStatus—
SetServiceTypevoid
# SetServiceType
C#
public void SetServiceType(string type);
Parameters
NameTypeDefault
typestring—

UpnpDevice.IgdStatus

ValueDescription
Disconnected = 5

Disconnected.

HttpEmpty = 2

Empty HTTP response.

HttpError = 1

HTTP error.

InvalidControl = 7

Invalid control.

MallocError = 8

Memory allocation error.

NoIgd = 4

Not a valid IGD.

NoUrls = 3

Returned response contained no URLs.

Ok = 0

OK.

UnknownDevice = 6

Unknown device.

UnknownError = 9

Unknown error.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.