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
Public Functions Documentation
function DeleteForwardingRule
Delete a forwarding rule from the router using UPnP.
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, portdescription
A description for the port forwarding ruleinternalPort
The port on the client machine to send traffic to
function GetExternalIP
function NetUPnP
The documentation for this class was generated from the following file api/unity-plugin/Scripts/Networking/Lidgren.Network/NetUPnP.cs