|
|
@@ -259,6 +259,14 @@ namespace ENet {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ public bool HasReferences {
|
|
|
+ get {
|
|
|
+ CheckCreated();
|
|
|
+
|
|
|
+ return Native.enet_packet_check_references(nativePacket) != 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
internal void CheckCreated() {
|
|
|
if (nativePacket == IntPtr.Zero)
|
|
|
throw new InvalidOperationException("Packet not created");
|
|
|
@@ -305,12 +313,6 @@ 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");
|
|
|
@@ -983,4 +985,4 @@ namespace ENet {
|
|
|
[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
|
|
|
internal static extern void enet_peer_reset(IntPtr peer);
|
|
|
}
|
|
|
-}
|
|
|
+}
|