From 2d0613516626960de5d7e3ea83b6386ce00dcb74 Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Sat, 23 May 2009 05:09:10 +0000
Subject: * 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.
---
OpenSim/Framework/Util.cs | 14 ++++++++++++++
1 file changed, 14 insertions(+)
(limited to 'OpenSim/Framework/Util.cs')
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
return null;
}
+ public static Uri GetURI(string protocol, string hostname, int port, string path)
+ {
+ return new UriBuilder(protocol, hostname, port, path).Uri;
+ }
+
+ ///
+ /// Gets a list of all local system IP addresses
+ ///
+ ///
+ public static IPAddress[] GetLocalHosts()
+ {
+ return Dns.GetHostAddresses(Dns.GetHostName());
+ }
+
public static IPAddress GetLocalHost()
{
string dnsAddress = "localhost";
--
cgit v1.1