aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
authorAdam Frisby2009-05-23 05:09:10 +0000
committerAdam Frisby2009-05-23 05:09:10 +0000
commit2d0613516626960de5d7e3ea83b6386ce00dcb74 (patch)
treee5c2f868532a3b68a12723112f845c735acb6b4d /OpenSim/Framework/Util.cs
parentChanging extension of two of the config files to .example because they need t... (diff)
downloadopensim-SC-2d0613516626960de5d7e3ea83b6386ce00dcb74.zip
opensim-SC-2d0613516626960de5d7e3ea83b6386ce00dcb74.tar.gz
opensim-SC-2d0613516626960de5d7e3ea83b6386ce00dcb74.tar.bz2
opensim-SC-2d0613516626960de5d7e3ea83b6386ce00dcb74.tar.xz
* Adds new NetworkUtil class, contains methods for handling IP resolution when located on the same subnet. (Eg, can be used to avoid NAT Loopback requirements if fully utilized.)
* Adds a few new network-related methods to Util.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Util.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 35efa02..0128735 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -517,6 +517,20 @@ namespace OpenSim.Framework
517 return null; 517 return null;
518 } 518 }
519 519
520 public static Uri GetURI(string protocol, string hostname, int port, string path)
521 {
522 return new UriBuilder(protocol, hostname, port, path).Uri;
523 }
524
525 /// <summary>
526 /// Gets a list of all local system IP addresses
527 /// </summary>
528 /// <returns></returns>
529 public static IPAddress[] GetLocalHosts()
530 {
531 return Dns.GetHostAddresses(Dns.GetHostName());
532 }
533
520 public static IPAddress GetLocalHost() 534 public static IPAddress GetLocalHost()
521 { 535 {
522 string dnsAddress = "localhost"; 536 string dnsAddress = "localhost";