Просмотр исходного кода

kcp中kcp_input方法使用long型,而long型在32跟64位系统中长度不一样,导致其它语言封送参数麻烦,这里将其改成int类型

tanghai 7 лет назад
Родитель
Сommit
b0ee4984c9

BIN
Server/ThirdParty/Libs/libkcp.so


BIN
Unity/Assets/Plugins/x86/kcp.dll


BIN
Unity/Assets/Plugins/x86_64/kcp.dll


+ 2 - 2
Unity/Assets/Scripts/Module/Message/Network/KCP/Kcp.cs

@@ -24,7 +24,7 @@ namespace ETModel
         [DllImport(KcpDLL, CallingConvention=CallingConvention.Cdecl)]
         private static extern uint ikcp_getconv(IntPtr ptr);
         [DllImport(KcpDLL, CallingConvention=CallingConvention.Cdecl)]
-        private static extern int ikcp_input(IntPtr kcp, byte[] data, long offset, long size);
+        private static extern int ikcp_input(IntPtr kcp, byte[] data, int offset, int size);
         [DllImport(KcpDLL, CallingConvention=CallingConvention.Cdecl)]
         private static extern int ikcp_nodelay(IntPtr kcp, int nodelay, int interval, int resend, int nc);
         [DllImport(KcpDLL, CallingConvention=CallingConvention.Cdecl)]
@@ -80,7 +80,7 @@ namespace ETModel
             return ikcp_getconv(ptr);
         }
 
-        public static int KcpInput(IntPtr kcp, byte[] data, long offset, long size)
+        public static int KcpInput(IntPtr kcp, byte[] data, int offset, int size)
         {
             if (kcp == IntPtr.Zero)
             {