|
|
@@ -305,6 +305,12 @@ namespace ENet {
|
|
|
nativePacket = Native.enet_packet_create(data, (IntPtr)length, flags);
|
|
|
}
|
|
|
|
|
|
+ public bool CheckReferences() {
|
|
|
+ CheckCreated();
|
|
|
+
|
|
|
+ return Native.enet_packet_check_references(nativePacket) != 0;
|
|
|
+ }
|
|
|
+
|
|
|
public void CopyTo(byte[] destination) {
|
|
|
if (destination == null)
|
|
|
throw new ArgumentNullException("destination");
|
|
|
@@ -787,7 +793,7 @@ namespace ENet {
|
|
|
public const uint timeoutLimit = 32;
|
|
|
public const uint timeoutMinimum = 5000;
|
|
|
public const uint timeoutMaximum = 30000;
|
|
|
- public const uint version = (2 << 16) | (1 << 8) | (4);
|
|
|
+ public const uint version = (2 << 16) | (1 << 8) | (5);
|
|
|
|
|
|
public static bool Initialize() {
|
|
|
return Native.enet_initialize() == 0;
|
|
|
@@ -839,6 +845,9 @@ namespace ENet {
|
|
|
[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern IntPtr enet_packet_create(IntPtr data, IntPtr dataLength, PacketFlags flags);
|
|
|
|
|
|
+ [DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
|
|
|
+ internal static extern int enet_packet_check_references(IntPtr packet);
|
|
|
+
|
|
|
[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern IntPtr enet_packet_get_data(IntPtr packet);
|
|
|
|