|
@@ -61,10 +61,9 @@ namespace ENet {
|
|
|
Zombie = 9
|
|
Zombie = 9
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- [StructLayout(LayoutKind.Sequential)]
|
|
|
|
|
|
|
+ [StructLayout(LayoutKind.Explicit, Size = 18)]
|
|
|
internal struct ENetAddress {
|
|
internal struct ENetAddress {
|
|
|
- [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
|
|
|
|
- public byte[] ip;
|
|
|
|
|
|
|
+ [FieldOffset(16)]
|
|
|
public ushort port;
|
|
public ushort port;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1083,4 +1082,4 @@ namespace ENet {
|
|
|
[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
|
|
[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_peer_reset(IntPtr peer);
|
|
internal static extern void enet_peer_reset(IntPtr peer);
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|