C# Class Lidgren.Network.NetUPnP

UPnP support class
Show file Open project: tomoprime/CrabBattle Class Usage Examples

Public Methods

Method Description
DeleteForwardingRule ( int port ) : bool

Delete a forwarding rule from the router using UPnP

ForwardPort ( int port, string description ) : bool

Add a forwarding rule to the router using UPnP

GetExternalIP ( ) : IPAddress

Retrieve the extern ip using UPnP

NetUPnP ( NetPeer peer ) : System

NetUPnP constructor

Private Methods

Method Description
CombineUrls ( string gatewayURL, string subURL ) : string
Discover ( NetPeer peer ) : void
ExtractServiceUrl ( string resp ) : void
SOAPRequest ( string url, string soap, string function ) : XmlDocument

Method Details

DeleteForwardingRule() public method

Delete a forwarding rule from the router using UPnP
public DeleteForwardingRule ( int port ) : bool
port int
return bool

ForwardPort() public method

Add a forwarding rule to the router using UPnP
public ForwardPort ( int port, string description ) : bool
port int
description string
return bool

GetExternalIP() public method

Retrieve the extern ip using UPnP
public GetExternalIP ( ) : IPAddress
return System.Net.IPAddress

NetUPnP() public method

NetUPnP constructor
public NetUPnP ( NetPeer peer ) : System
peer NetPeer
return System