Browse Source

Update to 2.3.7

nxrighthere 5 years ago
parent
commit
504c52bd3b
4 changed files with 1381 additions and 1497 deletions
  1. 1 1
      ENet-CSharp.nuspec
  2. 2 0
      README.md
  3. 12 1
      Source/Managed/ENet.cs
  4. 1366 1495
      Source/Native/enet.h

+ 1 - 1
ENet-CSharp.nuspec

@@ -2,7 +2,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
 <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
   <metadata>
   <metadata>
     <id>ENet-CSharp</id>
     <id>ENet-CSharp</id>
-    <version>2.3.6</version>
+    <version>2.3.7</version>
     <title>ENet-CSharp</title>
     <title>ENet-CSharp</title>
     <authors>Stanislav Denisov</authors>
     <authors>Stanislav Denisov</authors>
     <owners>nxrighthere</owners>
     <owners>nxrighthere</owners>

+ 2 - 0
README.md

@@ -344,6 +344,8 @@ Contains a managed pointer to the peer and cached ID.
 
 
 `Peer.RoundTripTime` returns a round trip time in milliseconds.
 `Peer.RoundTripTime` returns a round trip time in milliseconds.
 
 
+`Peer.LastRoundTripTime` returns a round trip time since the last acknowledgment in milliseconds.
+
 `Peer.LastSendTime` returns a last packet send time in milliseconds.
 `Peer.LastSendTime` returns a last packet send time in milliseconds.
 
 
 `Peer.LastReceiveTime` returns a last packet receive time in milliseconds.
 `Peer.LastReceiveTime` returns a last packet receive time in milliseconds.

+ 12 - 1
Source/Managed/ENet.cs

@@ -719,6 +719,14 @@ namespace ENet {
 			}
 			}
 		}
 		}
 
 
+		public uint LastRoundTripTime {
+			get {
+				CheckCreated();
+
+				return Native.enet_peer_get_last_rtt(nativePeer);
+			}
+		}
+
 		public uint LastSendTime {
 		public uint LastSendTime {
 			get {
 			get {
 				CheckCreated();
 				CheckCreated();
@@ -884,7 +892,7 @@ namespace ENet {
 		public const uint timeoutLimit = 32;
 		public const uint timeoutLimit = 32;
 		public const uint timeoutMinimum = 5000;
 		public const uint timeoutMinimum = 5000;
 		public const uint timeoutMaximum = 30000;
 		public const uint timeoutMaximum = 30000;
-		public const uint version = (2 << 16) | (3 << 8) | (6);
+		public const uint version = (2 << 16) | (3 << 8) | (7);
 
 
 		public static bool Initialize() {
 		public static bool Initialize() {
 			return Native.enet_initialize() == 0;
 			return Native.enet_initialize() == 0;
@@ -1047,6 +1055,9 @@ namespace ENet {
 		[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
 		[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
 		internal static extern uint enet_peer_get_rtt(IntPtr peer);
 		internal static extern uint enet_peer_get_rtt(IntPtr peer);
 
 
+		[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
+		internal static extern uint enet_peer_get_last_rtt(IntPtr peer);
+
 		[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
 		[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
 		internal static extern uint enet_peer_get_lastsendtime(IntPtr peer);
 		internal static extern uint enet_peer_get_lastsendtime(IntPtr peer);
 
 

File diff suppressed because it is too large
+ 1366 - 1495
Source/Native/enet.h


Some files were not shown because too many files changed in this diff