Lidgren.Network.NetUPnP.CombineUrls C# (CSharp) Method

CombineUrls() private static method

private static CombineUrls ( string gatewayURL, string subURL ) : string
gatewayURL string
subURL string
return string
        private static string CombineUrls(string gatewayURL, string subURL)
        {
            // Is Control URL an absolute URL?
            if ((subURL.Contains("http:")) || (subURL.Contains(".")))
                return subURL;

            gatewayURL = gatewayURL.Replace("http://", "");  // strip any protocol
            int n = gatewayURL.IndexOf("/");
            if (n != -1)
                gatewayURL = gatewayURL.Substring(0, n);  // Use first portion of URL
            return "http://" + gatewayURL + subURL;
        }