1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 22:56:30 +09:00

One more define to allow unity web player to run

This commit is contained in:
lidgren
2011-06-21 06:47:34 +00:00
parent daa1d4e946
commit 9554d33492
3 changed files with 9 additions and 3 deletions

View File

@@ -15,8 +15,9 @@ PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#define IS_FULL_NET_AVAILABLE
using System;
using System.Net;
using System.Net.NetworkInformation;
@@ -118,6 +119,7 @@ namespace Lidgren.Network
return best;
}
#if IS_FULL_NET_AVAILABLE
/// <summary>
/// Returns the physical (MAC) address for the first usable network interface
/// </summary>
@@ -128,6 +130,7 @@ namespace Lidgren.Network
return null;
return ni.GetPhysicalAddress();
}
#endif
/// <summary>
/// Create a hex string from an Int64 value
@@ -159,6 +162,7 @@ namespace Lidgren.Network
/// </summary>
public static IPAddress GetMyAddress(out IPAddress mask)
{
#if IS_FULL_NET_AVAILABLE
NetworkInterface ni = GetNetworkInterface();
if (ni == null)
{
@@ -175,7 +179,7 @@ namespace Lidgren.Network
return unicastAddress.Address;
}
}
#endif
mask = null;
return null;
}