LumiSoft Net Help
GetPublicEP Method (stunServer, port, socket)
Namespaces ► LumiSoft.Net.STUN.Client ► STUN_Client ► GetPublicEP(String, Int32, Socket)
Resolves socket local end point to public end point.
Declaration Syntax

C# | Visual Basic | Visual C++ | F#

    public static IPEndPoint GetPublicEP(
    	string stunServer,
    	int port,
    	Socket socket
    )

    Public Shared Function GetPublicEP (
    	stunServer As String,
    	port As Integer,
    	socket As Socket
    ) As IPEndPoint

    public:
    static IPEndPoint^ GetPublicEP(
    	String^ stunServer,
    	int port,
    	Socket^ socket
    )

    static member GetPublicEP :
            stunServer : string *
            port : int *
            socket : Socket -> IPEndPoint

Parameters

stunServer (String)
  STUN server.

port (Int32)
  STUN server port. Default port is 3478.

socket (Socket)
  UDP socket to use.

Return Value
IPEndPoint
Returns public IP end point.
Exceptions

Exception | Condition
--- | ---
ArgumentNullException | Is raised when stunServer or socket 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