LumiSoft Net Help
GetPublicIP Method (stunServer, port, localIP)
NamespacesLumiSoft.Net.STUN.ClientSTUN_ClientGetPublicIP(String, Int32, IPAddress)
Resolves local IP to public IP using STUN.
Declaration Syntax
C#Visual BasicVisual C++F#
public static IPAddress GetPublicIP(
	string stunServer,
	int port,
	IPAddress localIP
)
Public Shared Function GetPublicIP ( 
	stunServer As String,
	port As Integer,
	localIP As IPAddress
) As IPAddress
public:
static IPAddress^ GetPublicIP(
	String^ stunServer, 
	int port, 
	IPAddress^ localIP
)
static member GetPublicIP : 
        stunServer : string * 
        port : int * 
        localIP : IPAddress -> IPAddress 
Parameters
stunServer (String)
STUN server.
port (Int32)
STUN server port. Default port is 3478.
localIP (IPAddress)
Local IP address.
Return Value
IPAddress
Returns public IP address.
Exceptions
ExceptionCondition
ArgumentNullExceptionIs raised when stunServer or localIP is null reference.
ArgumentExceptionIs raised when any of the arguments has invalid value.
IOExceptionIs raised when no connection to STUN server.

Assembly: LumiSoft.Net (Module: LumiSoft.Net.dll) Version: 4.5.5510.19119