tanghai 2 лет назад
Родитель
Сommit
fa6c8135d9

+ 2 - 2
Unity/Assets/Scripts/Core/Network/KService.cs

@@ -48,7 +48,7 @@ namespace ET
         
         public NetworkProtocol Protocol { get; set; }
 
-        public KService(IPEndPoint ipEndPoint, ServiceType serviceType, NetworkProtocol protocol)
+        public KService(IPEndPoint ipEndPoint, NetworkProtocol protocol, ServiceType serviceType)
         {
             this.ServiceType = serviceType;
             this.startTime = TimeInfo.Instance.ClientFrameTime();
@@ -66,7 +66,7 @@ namespace ET
             }
         }
 
-        public KService(AddressFamily addressFamily, ServiceType serviceType, NetworkProtocol protocol)
+        public KService(AddressFamily addressFamily, NetworkProtocol protocol, ServiceType serviceType)
         {
             this.ServiceType = serviceType;
             this.startTime = TimeInfo.Instance.ClientFrameTime();

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Server/Benchmark/BenchmarkClientComponentSystem.cs

@@ -10,7 +10,7 @@ namespace ET.Server
         [EntitySystem]
         private static void Awake(this BenchmarkClientComponent self)
         {
-            for (int i = 0; i < 10; ++i)
+            for (int i = 0; i < 2; ++i)
             {
                 self.Start().Coroutine();
             }

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Server/Benchmark/FiberInit_BenchmarkClient.cs

@@ -18,7 +18,7 @@ namespace ET.Server
             //root.AddComponent<GateSessionKeyComponent>();
             //root.AddComponent<LocationProxyComponent>();
             //root.AddComponent<ActorLocationSenderComponent>();
-            root.AddComponent<NetComponent, AddressFamily, NetworkProtocol>(AddressFamily.InterNetwork, NetworkProtocol.UDP);
+            root.AddComponent<NetComponent, AddressFamily, NetworkProtocol>(AddressFamily.InterNetwork, NetworkProtocol.TCP);
             root.AddComponent<BenchmarkClientComponent>();
             await ETTask.CompletedTask;
         }

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Server/Benchmark/FiberInit_BenchmarkServer.cs

@@ -18,7 +18,7 @@ namespace ET.Server
             //root.AddComponent<GateSessionKeyComponent>();
             //root.AddComponent<LocationProxyComponent>();
             //root.AddComponent<ActorLocationSenderComponent>();
-            root.AddComponent<NetComponent, IPEndPoint, NetworkProtocol>(StartSceneConfigCategory.Instance.Benchmark.OuterIPPort, NetworkProtocol.UDP);
+            root.AddComponent<NetComponent, IPEndPoint, NetworkProtocol>(StartSceneConfigCategory.Instance.Benchmark.OuterIPPort, NetworkProtocol.TCP);
             root.AddComponent<BenchmarkServerComponent>();
             await ETTask.CompletedTask;
         }

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Server/Module/Message/ProcessOuterSenderSystem.cs

@@ -19,7 +19,7 @@ namespace ET.Server
                 }
                 case NetworkProtocol.KCP:
                 {
-                    self.AService = new KService(address, ServiceType.Inner, NetworkProtocol.UDP);
+                    self.AService = new KService(address, NetworkProtocol.UDP, ServiceType.Inner);
                     break;
                 }
             }

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Share/Module/Message/NetComponentSystem.cs

@@ -10,7 +10,7 @@ namespace ET
         [EntitySystem]
         private static void Awake(this NetComponent self, IPEndPoint address, NetworkProtocol protocol)
         {
-            self.AService = new KService(address, ServiceType.Outer, protocol);
+            self.AService = new KService(address, protocol, ServiceType.Outer);
             self.AService.AcceptCallback = self.OnAccept;
             self.AService.ReadCallback = self.OnRead;
             self.AService.ErrorCallback = self.OnError;
@@ -19,7 +19,7 @@ namespace ET
         [EntitySystem]
         private static void Awake(this NetComponent self, AddressFamily addressFamily, NetworkProtocol protocol)
         {
-            self.AService = new KService(addressFamily, ServiceType.Outer, protocol);
+            self.AService = new KService(addressFamily, protocol, ServiceType.Outer);
             self.AService.ReadCallback = self.OnRead;
             self.AService.ErrorCallback = self.OnError;
         }