Skip to content

Class Lidgren::Network::NetUPnP

ClassList > Lidgren > Network > NetUPnP

UPnP support class.

Public Properties

Type Name
property UPnPStatus Status
Status of the UPnP capabilities of this NetPeer.

Public Functions

Type Name
bool DeleteForwardingRule (int externalPort)
Delete a forwarding rule from the router using UPnP.
bool ForwardPort (int externalPort, string description, int internalPort=0)
Add a forwarding rule to the router using UPnP.
IPAddress GetExternalIP ()
Retrieve the extern ip using UPnP.
NetUPnP (NetPeer peer)
NetUPnP constructor.

Public Properties Documentation

property Status

UPnPStatus Lidgren.Network.NetUPnP.Status;

Public Functions Documentation

function DeleteForwardingRule

Delete a forwarding rule from the router using UPnP.

inline bool Lidgren::Network::NetUPnP::DeleteForwardingRule (
    int externalPort
) 

Parameters:

  • externalPort The external, 'internet facing', port

function ForwardPort

Add a forwarding rule to the router using UPnP.

inline bool Lidgren::Network::NetUPnP::ForwardPort (
    int externalPort,
    string description,
    int internalPort=0
) 

Parameters:

  • externalPort The external, WAN facing, port
  • description A description for the port forwarding rule
  • internalPort The port on the client machine to send traffic to

function GetExternalIP

inline IPAddress Lidgren::Network::NetUPnP::GetExternalIP () 

function NetUPnP

inline Lidgren::Network::NetUPnP::NetUPnP (
    NetPeer peer
) 

The documentation for this class was generated from the following file api/unity-plugin/Scripts/Networking/Lidgren.Network/NetUPnP.cs