diff options
author | Oren Hurvitz | 2015-07-23 14:50:50 +0300 |
---|---|---|
committer | Oren Hurvitz | 2015-07-23 14:50:50 +0300 |
commit | 83da58226114ddda41c984fed8298908ed012c8b (patch) | |
tree | 7af22f8d5f42d9075ee67b9139a76e703f3d6a18 /OpenSim/Framework | |
parent | Git-ignore log files and console history files (diff) | |
download | opensim-SC-83da58226114ddda41c984fed8298908ed012c8b.zip opensim-SC-83da58226114ddda41c984fed8298908ed012c8b.tar.gz opensim-SC-83da58226114ddda41c984fed8298908ed012c8b.tar.bz2 opensim-SC-83da58226114ddda41c984fed8298908ed012c8b.tar.xz |
Removed unused code related to DNS lookups
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Util.cs | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs index 2d0b280..4e75a5c 100644 --- a/OpenSim/Framework/Util.cs +++ b/OpenSim/Framework/Util.cs | |||
@@ -805,16 +805,6 @@ namespace OpenSim.Framework | |||
805 | } | 805 | } |
806 | 806 | ||
807 | /// <summary> | 807 | /// <summary> |
808 | /// Converts a URL to a IPAddress | ||
809 | /// </summary> | ||
810 | /// <param name="url">URL Standard Format</param> | ||
811 | /// <returns>A resolved IP Address</returns> | ||
812 | public static IPAddress GetHostFromURL(string url) | ||
813 | { | ||
814 | return GetHostFromDNS(url.Split(new char[] {'/', ':'})[3]); | ||
815 | } | ||
816 | |||
817 | /// <summary> | ||
818 | /// Returns a IP address from a specified DNS, favouring IPv4 addresses. | 808 | /// Returns a IP address from a specified DNS, favouring IPv4 addresses. |
819 | /// </summary> | 809 | /// </summary> |
820 | /// <param name="dnsAddress">DNS Hostname</param> | 810 | /// <param name="dnsAddress">DNS Hostname</param> |
@@ -1802,32 +1792,6 @@ namespace OpenSim.Framework | |||
1802 | return found.ToArray(); | 1792 | return found.ToArray(); |
1803 | } | 1793 | } |
1804 | 1794 | ||
1805 | public static string ServerURI(string uri) | ||
1806 | { | ||
1807 | if (uri == string.Empty) | ||
1808 | return string.Empty; | ||
1809 | |||
1810 | // Get rid of eventual slashes at the end | ||
1811 | uri = uri.TrimEnd('/'); | ||
1812 | |||
1813 | IPAddress ipaddr1 = null; | ||
1814 | string port1 = ""; | ||
1815 | try | ||
1816 | { | ||
1817 | ipaddr1 = Util.GetHostFromURL(uri); | ||
1818 | } | ||
1819 | catch { } | ||
1820 | |||
1821 | try | ||
1822 | { | ||
1823 | port1 = uri.Split(new char[] { ':' })[2]; | ||
1824 | } | ||
1825 | catch { } | ||
1826 | |||
1827 | // We tried our best to convert the domain names to IP addresses | ||
1828 | return (ipaddr1 != null) ? "http://" + ipaddr1.ToString() + ":" + port1 : uri; | ||
1829 | } | ||
1830 | |||
1831 | /// <summary> | 1795 | /// <summary> |
1832 | /// Convert a string to a byte format suitable for transport in an LLUDP packet. The output is truncated to 256 bytes if necessary. | 1796 | /// Convert a string to a byte format suitable for transport in an LLUDP packet. The output is truncated to 256 bytes if necessary. |
1833 | /// </summary> | 1797 | /// </summary> |