NetworkingPeer.GetNameServerAddress C# (CSharp) Method

GetNameServerAddress() private method

Gets the NameServer Address (with prefix and port), based on the set protocol (this.UsedProtocol).
private GetNameServerAddress ( ) : string
return string
    private string GetNameServerAddress()
    {
        #if RHTTP
        if (currentProtocol == ConnectionProtocol.RHttp)
        {
            return NameServerHttp;
        }
        #endif

        ConnectionProtocol currentProtocol = this.UsedProtocol;
        int protocolPort = 0;
        ProtocolToNameServerPort.TryGetValue(currentProtocol, out protocolPort);

        string protocolPrefix = string.Empty;
        if (currentProtocol == ConnectionProtocol.WebSocket)
        {
            protocolPrefix = "ws://";
        }
        else if (currentProtocol == ConnectionProtocol.WebSocketSecure)
        {
            protocolPrefix = "wss://";
        }

        return string.Format("{0}{1}:{2}", protocolPrefix, NameServerHost, protocolPort);
    }
NetworkingPeer