Moved all HG1 operations to HGGridConnector.cs and HypergridServerConnector.cs/HypergridServiceConnector.cs, away from Region.Communications and HGNetworkServersInfo.

Fixed small bugs with hyperlinked regions' map positions.
This commit is contained in:
Diva Canto
2009-09-26 21:00:51 -07:00
parent dcfd08b8dd
commit f4bf581b96
14 changed files with 538 additions and 101 deletions

View File

@@ -1203,6 +1203,32 @@ namespace OpenSim.Framework
return found.ToArray();
}
public static string ServerURI(string uri)
{
if (uri == string.Empty)
return string.Empty;
// Get rid of eventual slashes at the end
uri = uri.TrimEnd('/');
IPAddress ipaddr1 = null;
string port1 = "";
try
{
ipaddr1 = Util.GetHostFromURL(uri);
}
catch { }
try
{
port1 = uri.Split(new char[] { ':' })[2];
}
catch { }
// We tried our best to convert the domain names to IP addresses
return (ipaddr1 != null) ? "http://" + ipaddr1.ToString() + ":" + port1 : uri;
}
#region FireAndForget Threading Pattern
public static void FireAndForget(System.Threading.WaitCallback callback)