You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-19 00:26:30 +09:00
Fix for __CONSTRAINED__ and __ANDROID__
This commit is contained in:
@@ -12,8 +12,6 @@ namespace Lidgren.Network
|
|||||||
|
|
||||||
static NetUtility()
|
static NetUtility()
|
||||||
{
|
{
|
||||||
s_randomMacBytes = new byte[8];
|
|
||||||
MWCRandom.Instance.NextBytes(s_randomMacBytes);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
@@ -50,6 +48,11 @@ namespace Lidgren.Network
|
|||||||
|
|
||||||
public static byte[] GetMacAddressBytes()
|
public static byte[] GetMacAddressBytes()
|
||||||
{
|
{
|
||||||
|
if (s_randomMacBytes == null)
|
||||||
|
{
|
||||||
|
s_randomMacBytes = new byte[8];
|
||||||
|
MWCRandom.Instance.NextBytes(s_randomMacBytes);
|
||||||
|
}
|
||||||
return s_randomMacBytes;
|
return s_randomMacBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ namespace Lidgren.Network
|
|||||||
|
|
||||||
static NetUtility()
|
static NetUtility()
|
||||||
{
|
{
|
||||||
s_randomMacBytes = new byte[8];
|
|
||||||
MWCRandom.Instance.NextBytes(s_randomMacBytes);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[CLSCompliant(false)]
|
[CLSCompliant(false)]
|
||||||
@@ -48,6 +46,11 @@ namespace Lidgren.Network
|
|||||||
|
|
||||||
public static byte[] GetMacAddressBytes()
|
public static byte[] GetMacAddressBytes()
|
||||||
{
|
{
|
||||||
|
if (s_randomMacBytes == null)
|
||||||
|
{
|
||||||
|
s_randomMacBytes = new byte[8];
|
||||||
|
MWCRandom.Instance.NextBytes(s_randomMacBytes);
|
||||||
|
}
|
||||||
return s_randomMacBytes;
|
return s_randomMacBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user