Resolves local IP to public IP using STUN.
Declaration Syntax
C# | Visual Basic | Visual 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
Return Value
IPAddress
Returns public IP address.
Returns public IP address.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | Is raised when stunServer or localIP is null reference. |
ArgumentException | Is raised when any of the arguments has invalid value. |
IOException | Is raised when no connection to STUN server. |
Assembly: LumiSoft.Net (Module: LumiSoft.Net.dll) Version: 4.5.5510.19119