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

1.服务端增加模块module目录,一个模块功能可能需要好几个Entity Component System搭配使用,将这些类放到同一目录方便管理
2.服务端去掉了Base工程,合并到Model工程里面

tanghai 8 лет назад
Родитель
Сommit
d80992f475
51 измененных файлов с 51 добавлено и 107 удалено
  1. 0 15
      Client-Server.sln
  2. 0 59
      Server/Base/Server.Base.csproj
  3. 1 0
      Server/Hotfix/Module/Actor/ActorComponentSystem.cs
  4. 0 0
      Server/Hotfix/Module/DB/DBQueryBatchRequestHandler.cs
  5. 0 0
      Server/Hotfix/Module/DB/DBQueryJsonRequestHandler.cs
  6. 0 0
      Server/Hotfix/Module/DB/DBQueryRequestHandler.cs
  7. 0 0
      Server/Hotfix/Module/DB/DBSaveBatchRequestHandler.cs
  8. 0 0
      Server/Hotfix/Module/DB/DBSaveRequestHandler.cs
  9. 0 0
      Server/Hotfix/Module/Location/ObjectAddRequestHandler.cs
  10. 0 0
      Server/Hotfix/Module/Location/ObjectGetRequestHandler.cs
  11. 0 0
      Server/Hotfix/Module/Location/ObjectLockRequestHandler.cs
  12. 0 0
      Server/Hotfix/Module/Location/ObjectRemoveRequestHandler.cs
  13. 0 0
      Server/Hotfix/Module/Location/ObjectUnLockRequestHandler.cs
  14. 0 0
      Server/Hotfix/Module/Network/InnerMessageDispatcher.cs
  15. 0 0
      Server/Hotfix/Module/Network/NetInnerComponentSystem.cs
  16. 0 0
      Server/Hotfix/Module/Network/NetOuterComponentSystem.cs
  17. 0 0
      Server/Hotfix/Module/Network/OuterMessageDispatcher.cs
  18. 0 1
      Server/Hotfix/Server.Hotfix.csproj
  19. 0 0
      Server/Model/Base/Log.cs
  20. 0 0
      Server/Model/Base/LogType.cs
  21. 0 0
      Server/Model/Base/Logger/ALogDecorater.cs
  22. 0 0
      Server/Model/Base/Logger/ILog.cs
  23. 0 0
      Server/Model/Base/Logger/NLogAdapter.cs
  24. 0 0
      Server/Model/Base/Logger/StackInfoDecorater.cs
  25. 0 0
      Server/Model/Module/Actor/ActorComponent.cs
  26. 0 0
      Server/Model/Module/Actor/ActorManagerComponent.cs
  27. 0 0
      Server/Model/Module/Actor/ActorMessageDispatherComponent.cs
  28. 0 0
      Server/Model/Module/Actor/ActorProxy.cs
  29. 0 0
      Server/Model/Module/Actor/ActorProxyComponent.cs
  30. 0 0
      Server/Model/Module/DB/DBCacheComponent.cs
  31. 0 0
      Server/Model/Module/DB/DBComponent.cs
  32. 0 0
      Server/Model/Module/DB/DBProxyComponent.cs
  33. 0 0
      Server/Model/Module/DB/DBQueryBatchTask.cs
  34. 0 0
      Server/Model/Module/DB/DBQueryJsonTask.cs
  35. 0 0
      Server/Model/Module/DB/DBQueryTask.cs
  36. 0 0
      Server/Model/Module/DB/DBSaveBatchTask.cs
  37. 0 0
      Server/Model/Module/DB/DBSaveTask.cs
  38. 0 0
      Server/Model/Module/DB/DBTask.cs
  39. 0 0
      Server/Model/Module/DB/DBTaskQueue.cs
  40. 0 0
      Server/Model/Module/Location/Location.cs
  41. 0 0
      Server/Model/Module/Location/LocationComponent.cs
  42. 0 0
      Server/Model/Module/Location/LocationProxyComponent.cs
  43. 0 0
      Server/Model/Module/Network/AMHandler.cs
  44. 0 0
      Server/Model/Module/Network/MessageDispatherComponent.cs
  45. 0 0
      Server/Model/Module/Network/NetInnerComponent.cs
  46. 0 0
      Server/Model/Module/Network/NetOuterComponent.cs
  47. 41 12
      Server/Model/Server.Model.csproj
  48. 1 15
      Server/Server.sln
  49. 0 0
      Unity/Assets/Scripts/Base/Helper/MongoHelper.cs
  50. 0 0
      Unity/Assets/Scripts/Base/Helper/MongoHelper.cs.meta
  51. 8 5
      Unity/Unity.csproj

+ 0 - 15
Client-Server.sln

@@ -21,8 +21,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unity.Editor.Plugins", "Uni
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server.App", "Server\App\Server.App.csproj", "{69F1AA11-D05A-4843-B0DD-56B5E2E212A8}"
 EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server.Base", "Server\Base\Server.Base.csproj", "{909B117C-7709-4F48-A142-40CE26FF99C9}"
-EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server.Model", "Server\Model\Server.Model.csproj", "{EE38E3D2-3D2A-4061-BD50-AE8568126C7D}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server.Hotfix", "Server\Hotfix\Server.Hotfix.csproj", "{C305ED5B-8425-47A1-BEE1-85830CADC27A}"
@@ -117,18 +115,6 @@ Global
 		{69F1AA11-D05A-4843-B0DD-56B5E2E212A8}.Release|x64.Build.0 = Release|Any CPU
 		{69F1AA11-D05A-4843-B0DD-56B5E2E212A8}.Release|x86.ActiveCfg = Release|Any CPU
 		{69F1AA11-D05A-4843-B0DD-56B5E2E212A8}.Release|x86.Build.0 = Release|Any CPU
-		{909B117C-7709-4F48-A142-40CE26FF99C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{909B117C-7709-4F48-A142-40CE26FF99C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{909B117C-7709-4F48-A142-40CE26FF99C9}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{909B117C-7709-4F48-A142-40CE26FF99C9}.Debug|x64.Build.0 = Debug|Any CPU
-		{909B117C-7709-4F48-A142-40CE26FF99C9}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{909B117C-7709-4F48-A142-40CE26FF99C9}.Debug|x86.Build.0 = Debug|Any CPU
-		{909B117C-7709-4F48-A142-40CE26FF99C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{909B117C-7709-4F48-A142-40CE26FF99C9}.Release|Any CPU.Build.0 = Release|Any CPU
-		{909B117C-7709-4F48-A142-40CE26FF99C9}.Release|x64.ActiveCfg = Release|Any CPU
-		{909B117C-7709-4F48-A142-40CE26FF99C9}.Release|x64.Build.0 = Release|Any CPU
-		{909B117C-7709-4F48-A142-40CE26FF99C9}.Release|x86.ActiveCfg = Release|Any CPU
-		{909B117C-7709-4F48-A142-40CE26FF99C9}.Release|x86.Build.0 = Release|Any CPU
 		{EE38E3D2-3D2A-4061-BD50-AE8568126C7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{EE38E3D2-3D2A-4061-BD50-AE8568126C7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{EE38E3D2-3D2A-4061-BD50-AE8568126C7D}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -201,7 +187,6 @@ Global
 		{C17F48D3-964E-E97C-3D2E-966F7A6C6D93} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
 		{81A6E58E-BFF2-F1C8-1C4E-6316985F642C} = {914C77C9-212A-4DD0-8D9A-074620E77FAA}
 		{69F1AA11-D05A-4843-B0DD-56B5E2E212A8} = {46008B91-6EC0-448B-8D1A-D8C6D2EEBEF4}
-		{909B117C-7709-4F48-A142-40CE26FF99C9} = {46008B91-6EC0-448B-8D1A-D8C6D2EEBEF4}
 		{EE38E3D2-3D2A-4061-BD50-AE8568126C7D} = {46008B91-6EC0-448B-8D1A-D8C6D2EEBEF4}
 		{C305ED5B-8425-47A1-BEE1-85830CADC27A} = {46008B91-6EC0-448B-8D1A-D8C6D2EEBEF4}
 		{4940CE10-6652-4AC6-9D30-CF200A217643} = {78640FA0-9F11-412D-A639-61F03D02407A}

+ 0 - 59
Server/Base/Server.Base.csproj

@@ -1,59 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <PropertyGroup>
-    <TargetFramework>netcoreapp2.0</TargetFramework>
-    <AssemblyName>Base</AssemblyName>
-    <RootNamespace>Model</RootNamespace>
-  </PropertyGroup>
-
-  <PropertyGroup>
-    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
-    <DefineConstants>TRACE;DEBUG;NETCOREAPP2_0;SERVER</DefineConstants>
-    <OutputPath>bin\Debug\..\..\..\..\Bin\</OutputPath>
-  </PropertyGroup>
-
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
-    <DefineConstants>TRACE;RELEASE;NETCOREAPP2_0;SERVER</DefineConstants>
-    <OutputPath>bin\Release\..\..\..\..\Bin\</OutputPath>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\DoubleMap.cs" Link="DoubleMap.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\ArrayHelper.cs" Link="Helper\ArrayHelper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\ByteHelper.cs" Link="Helper\ByteHelper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\EnumHelper.cs" Link="Helper\EnumHelper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\FileHelper.cs" Link="Helper\FileHelper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\IdGenerater.cs" Link="Helper\IdGenerater.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\MD5Helper.cs" Link="Helper\MD5Helper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\MethodInfoHelper.cs" Link="Helper\MethodInfoHelper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\NetHelper.cs" Link="Helper\NetHelper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\ProtobufHelper.cs" Link="Helper\ProtobufHelper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\RandomHelper.cs" Link="Helper\RandomHelper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\StringHelper.cs" Link="Helper\StringHelper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\TimeHelper.cs" Link="Helper\TimeHelper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\ZipHelper.cs" Link="Helper\ZipHelper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\MultiMap.cs" Link="MultiMap.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\AChannel.cs" Link="Network\AChannel.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\AService.cs" Link="Network\AService.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\Circularbuffer.cs" Link="Network\Circularbuffer.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\KNet\KChannel.cs" Link="Network\KNet\KChannel.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\KNet\Kcp.cs" Link="Network\KNet\Kcp.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\KNet\KService.cs" Link="Network\KNet\KService.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\NetworkHelper.cs" Link="Network\NetworkHelper.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\TNet\PacketParser.cs" Link="Network\TNet\PacketParser.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\TNet\TChannel.cs" Link="Network\TNet\TChannel.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\TNet\TService.cs" Link="Network\TNet\TService.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\QueueDictionary.cs" Link="QueueDictionary.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\TryLocker.cs" Link="TryLocker.cs" />
-  </ItemGroup>
-
-  <ItemGroup>
-    <PackageReference Include="NLog" Version="5.0.0-beta11" />
-    <PackageReference Include="protobuf-net" Version="2.3.2" />
-    <PackageReference Include="SharpZipLib" Version="1.0.0-alpha2" />
-  </ItemGroup>
-
-</Project>

+ 1 - 0
Server/Hotfix/System/ActorComponentSystem.cs → Server/Hotfix/Module/Actor/ActorComponentSystem.cs

@@ -20,6 +20,7 @@ namespace Hotfix
 
 		public void Load()
 		{
+			this.Get().Load();
 		}
 	}
 

+ 0 - 0
Server/Hotfix/Handler/DBQueryBatchRequestHandler.cs → Server/Hotfix/Module/DB/DBQueryBatchRequestHandler.cs


+ 0 - 0
Server/Hotfix/Handler/DBQueryJsonRequestHandler.cs → Server/Hotfix/Module/DB/DBQueryJsonRequestHandler.cs


+ 0 - 0
Server/Hotfix/Handler/DBQueryRequestHandler.cs → Server/Hotfix/Module/DB/DBQueryRequestHandler.cs


+ 0 - 0
Server/Hotfix/Handler/DBSaveBatchRequestHandler.cs → Server/Hotfix/Module/DB/DBSaveBatchRequestHandler.cs


+ 0 - 0
Server/Hotfix/Handler/DBSaveRequestHandler.cs → Server/Hotfix/Module/DB/DBSaveRequestHandler.cs


+ 0 - 0
Server/Hotfix/Handler/ObjectAddRequestHandler.cs → Server/Hotfix/Module/Location/ObjectAddRequestHandler.cs


+ 0 - 0
Server/Hotfix/Handler/ObjectGetRequestHandler.cs → Server/Hotfix/Module/Location/ObjectGetRequestHandler.cs


+ 0 - 0
Server/Hotfix/Handler/ObjectLockRequestHandler.cs → Server/Hotfix/Module/Location/ObjectLockRequestHandler.cs


+ 0 - 0
Server/Hotfix/Handler/ObjectRemoveRequestHandler.cs → Server/Hotfix/Module/Location/ObjectRemoveRequestHandler.cs


+ 0 - 0
Server/Hotfix/Handler/ObjectUnLockRequestHandler.cs → Server/Hotfix/Module/Location/ObjectUnLockRequestHandler.cs


+ 0 - 0
Server/Hotfix/Other/InnerMessageDispatcher.cs → Server/Hotfix/Module/Network/InnerMessageDispatcher.cs


+ 0 - 0
Server/Hotfix/System/NetInnerComponentSystem.cs → Server/Hotfix/Module/Network/NetInnerComponentSystem.cs


+ 0 - 0
Server/Hotfix/System/NetOuterComponentSystem.cs → Server/Hotfix/Module/Network/NetOuterComponentSystem.cs


+ 0 - 0
Server/Hotfix/Other/OuterMessageDispatcher.cs → Server/Hotfix/Module/Network/OuterMessageDispatcher.cs


+ 0 - 1
Server/Hotfix/Server.Hotfix.csproj

@@ -21,7 +21,6 @@
   </PropertyGroup>
 
   <ItemGroup>
-    <ProjectReference Include="..\Base\Server.Base.csproj" />
     <ProjectReference Include="..\Model\Server.Model.csproj" />
   </ItemGroup>
 

+ 0 - 0
Server/Base/Log.cs → Server/Model/Base/Log.cs


+ 0 - 0
Server/Base/LogType.cs → Server/Model/Base/LogType.cs


+ 0 - 0
Server/Base/Logger/ALogDecorater.cs → Server/Model/Base/Logger/ALogDecorater.cs


+ 0 - 0
Server/Base/Logger/ILog.cs → Server/Model/Base/Logger/ILog.cs


+ 0 - 0
Server/Base/Logger/NLogAdapter.cs → Server/Model/Base/Logger/NLogAdapter.cs


+ 0 - 0
Server/Base/Logger/StackInfoDecorater.cs → Server/Model/Base/Logger/StackInfoDecorater.cs


+ 0 - 0
Server/Model/Component/ActorComponent.cs → Server/Model/Module/Actor/ActorComponent.cs


+ 0 - 0
Server/Model/Component/ActorManagerComponent.cs → Server/Model/Module/Actor/ActorManagerComponent.cs


+ 0 - 0
Server/Model/Component/ActorMessageDispatherComponent.cs → Server/Model/Module/Actor/ActorMessageDispatherComponent.cs


+ 0 - 0
Server/Model/Entity/ActorProxy.cs → Server/Model/Module/Actor/ActorProxy.cs


+ 0 - 0
Server/Model/Component/ActorProxyComponent.cs → Server/Model/Module/Actor/ActorProxyComponent.cs


+ 0 - 0
Server/Model/Component/DBCacheComponent.cs → Server/Model/Module/DB/DBCacheComponent.cs


+ 0 - 0
Server/Model/Component/DBComponent.cs → Server/Model/Module/DB/DBComponent.cs


+ 0 - 0
Server/Model/Component/DBProxyComponent.cs → Server/Model/Module/DB/DBProxyComponent.cs


+ 0 - 0
Server/Model/Entity/DBQueryBatchTask.cs → Server/Model/Module/DB/DBQueryBatchTask.cs


+ 0 - 0
Server/Model/Entity/DBQueryJsonTask.cs → Server/Model/Module/DB/DBQueryJsonTask.cs


+ 0 - 0
Server/Model/Entity/DBQueryTask.cs → Server/Model/Module/DB/DBQueryTask.cs


+ 0 - 0
Server/Model/Entity/DBSaveBatchTask.cs → Server/Model/Module/DB/DBSaveBatchTask.cs


+ 0 - 0
Server/Model/Entity/DBSaveTask.cs → Server/Model/Module/DB/DBSaveTask.cs


+ 0 - 0
Server/Model/Entity/DBTask.cs → Server/Model/Module/DB/DBTask.cs


+ 0 - 0
Server/Model/Entity/DBTaskQueue.cs → Server/Model/Module/DB/DBTaskQueue.cs


+ 0 - 0
Server/Model/Entity/Location.cs → Server/Model/Module/Location/Location.cs


+ 0 - 0
Server/Model/Component/LocationComponent.cs → Server/Model/Module/Location/LocationComponent.cs


+ 0 - 0
Server/Model/Component/LocationProxyComponent.cs → Server/Model/Module/Location/LocationProxyComponent.cs


+ 0 - 0
Server/Model/Message/AMHandler.cs → Server/Model/Module/Network/AMHandler.cs


+ 0 - 0
Server/Model/Component/MessageDispatherComponent.cs → Server/Model/Module/Network/MessageDispatherComponent.cs


+ 0 - 0
Server/Model/Component/NetInnerComponent.cs → Server/Model/Module/Network/NetInnerComponent.cs


+ 0 - 0
Server/Model/Component/NetOuterComponent.cs → Server/Model/Module/Network/NetOuterComponent.cs


+ 41 - 12
Server/Model/Server.Model.csproj

@@ -21,15 +21,41 @@
   </PropertyGroup>
 
   <ItemGroup>
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\DoubleMap.cs" Link="Base\DoubleMap.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\ArrayHelper.cs" Link="Base\Helper\ArrayHelper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\ByteHelper.cs" Link="Base\Helper\ByteHelper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\EnumHelper.cs" Link="Base\Helper\EnumHelper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\FileHelper.cs" Link="Base\Helper\FileHelper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\IdGenerater.cs" Link="Base\Helper\IdGenerater.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\MD5Helper.cs" Link="Base\Helper\MD5Helper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\MethodInfoHelper.cs" Link="Base\Helper\MethodInfoHelper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\MongoHelper.cs" Link="Base\Helper\MongoHelper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\NetHelper.cs" Link="Base\Helper\NetHelper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\ProtobufHelper.cs" Link="Base\Helper\ProtobufHelper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\RandomHelper.cs" Link="Base\Helper\RandomHelper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\StringHelper.cs" Link="Base\Helper\StringHelper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\TimeHelper.cs" Link="Base\Helper\TimeHelper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Helper\ZipHelper.cs" Link="Base\Helper\ZipHelper.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\AActorMessage.cs" Link="Base\Message\AActorMessage.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\AMessage.cs" Link="Base\Message\AMessage.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\AppType.cs" Link="Message\AppType.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\IMessageDispatcher.cs" Link="Message\IMessageDispatcher.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\IMessagePacker.cs" Link="Message\IMessagePacker.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\AppType.cs" Link="Other\AppType.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\IMessageDispatcher.cs" Link="Module\Network\IMessageDispatcher.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\IMessagePacker.cs" Link="Module\Network\IMessagePacker.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\MessageInfo.cs" Link="Base\Message\MessageInfo.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\MongoPacker.cs" Link="Message\MongoPacker.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\ProtobufPacker.cs" Link="Message\ProtobufPacker.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\RpcException.cs" Link="Message\RpcException.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\MongoPacker.cs" Link="Module\Network\MongoPacker.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\ProtobufPacker.cs" Link="Module\Network\ProtobufPacker.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Message\RpcException.cs" Link="Module\Network\RpcException.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\MultiMap.cs" Link="Base\MultiMap.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\AChannel.cs" Link="Base\Network\AChannel.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\AService.cs" Link="Base\Network\AService.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\Circularbuffer.cs" Link="Base\Network\Circularbuffer.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\KNet\KChannel.cs" Link="Base\Network\KNet\KChannel.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\KNet\Kcp.cs" Link="Base\Network\KNet\Kcp.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\KNet\KService.cs" Link="Base\Network\KNet\KService.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\NetworkHelper.cs" Link="Base\Network\NetworkHelper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\TNet\PacketParser.cs" Link="Base\Network\TNet\PacketParser.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\TNet\TChannel.cs" Link="Base\Network\TNet\TChannel.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\Network\TNet\TService.cs" Link="Base\Network\TNet\TService.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\Component.cs" Link="Base\Object\Component.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ComponentFactory.cs" Link="Base\Object\ComponentFactory.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\Disposer.cs" Link="Base\Object\Disposer.cs" />
@@ -44,34 +70,37 @@
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\Object.cs" Link="Base\Object\Object.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ObjectEventAttribute.cs" Link="Base\Object\ObjectEventAttribute.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Base\Object\ObjectPool.cs" Link="Base\Object\ObjectPool.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\QueueDictionary.cs" Link="Base\QueueDictionary.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Base\TryLocker.cs" Link="Base\TryLocker.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Component\ConfigComponent.cs" Link="Component\ConfigComponent.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Component\Config\ClientConfig.cs" Link="Component\Config\ClientConfig.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Component\Config\DBConfig.cs" Link="Component\Config\DBConfig.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Component\Config\HttpConfig.cs" Link="Component\Config\HttpConfig.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Component\Config\InnerConfig.cs" Link="Component\Config\InnerConfig.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Component\Config\OuterConfig.cs" Link="Component\Config\OuterConfig.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Component\NetworkComponent.cs" Link="Component\NetworkComponent.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Component\NetworkComponent.cs" Link="Module\Network\NetworkComponent.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Component\TimerComponent.cs" Link="Component\TimerComponent.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Entity\Message\Opcode.cs" Link="Entity\Message\Opcode.cs" />
     <Compile Include="..\..\Unity\Assets\Scripts\Entity\Message\OuterMessage.cs" Link="Entity\Message\OuterMessage.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Entity\Session.cs" Link="Entity\Session.cs" />
-    <Compile Include="..\..\Unity\Assets\Scripts\Helper\MongoHelper.cs" Link="Helper\MongoHelper.cs" />
+    <Compile Include="..\..\Unity\Assets\Scripts\Entity\Session.cs" Link="Module\Network\Session.cs" />
   </ItemGroup>
 
   <ItemGroup>
-    <PackageReference Include="CommandLineParser" Version="2.1.1-beta" />
-    <PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
+    <PackageReference Include="CommandLineParser" Version="2.2.1" />
+    <PackageReference Include="NLog" Version="4.5.0-rc04" />
+    <PackageReference Include="protobuf-net" Version="2.3.4" />
     <PackageReference Include="SharpZipLib" Version="1.0.0-alpha2" />
   </ItemGroup>
 
   <ItemGroup>
-    <ProjectReference Include="..\Base\Server.Base.csproj" />
     <ProjectReference Include="..\ThirdParty\MongodbDriver\DotNetCoreDriver\MongoDB.Bson\MongoDB.Bson.csproj" />
     <ProjectReference Include="..\ThirdParty\MongodbDriver\DotNetCoreDriver\MongoDB.Driver.Core\MongoDB.Driver.Core.csproj" />
     <ProjectReference Include="..\ThirdParty\MongodbDriver\DotNetCoreDriver\MongoDB.Driver\MongoDB.Driver.csproj" />
   </ItemGroup>
 
   <ItemGroup>
+    <Folder Include="Base\Network\KNet\" />
+    <Folder Include="Base\Network\TNet\" />
     <Folder Include="Component\Config\" />
   </ItemGroup>
 </Project>

+ 1 - 15
Server/Server.sln

@@ -1,12 +1,10 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 15
-VisualStudioVersion = 15.0.27130.2003
+VisualStudioVersion = 15.0.27130.2010
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server.App", "App\Server.App.csproj", "{11464C2C-E0B6-476E-ABB1-87445E736B76}"
 EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server.Base", "Base\Server.Base.csproj", "{9FB55F6F-9A5B-4B8C-A1DD-374A431BAB57}"
-EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server.Hotfix", "Hotfix\Server.Hotfix.csproj", "{E383A68D-1928-46F4-8896-4E99DF331476}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server.Model", "Model\Server.Model.csproj", "{85CB09B5-6392-4A13-BAF8-025218BFF496}"
@@ -43,18 +41,6 @@ Global
 		{11464C2C-E0B6-476E-ABB1-87445E736B76}.Release|x64.Build.0 = Release|Any CPU
 		{11464C2C-E0B6-476E-ABB1-87445E736B76}.Release|x86.ActiveCfg = Release|Any CPU
 		{11464C2C-E0B6-476E-ABB1-87445E736B76}.Release|x86.Build.0 = Release|Any CPU
-		{9FB55F6F-9A5B-4B8C-A1DD-374A431BAB57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{9FB55F6F-9A5B-4B8C-A1DD-374A431BAB57}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{9FB55F6F-9A5B-4B8C-A1DD-374A431BAB57}.Debug|x64.ActiveCfg = Debug|Any CPU
-		{9FB55F6F-9A5B-4B8C-A1DD-374A431BAB57}.Debug|x64.Build.0 = Debug|Any CPU
-		{9FB55F6F-9A5B-4B8C-A1DD-374A431BAB57}.Debug|x86.ActiveCfg = Debug|Any CPU
-		{9FB55F6F-9A5B-4B8C-A1DD-374A431BAB57}.Debug|x86.Build.0 = Debug|Any CPU
-		{9FB55F6F-9A5B-4B8C-A1DD-374A431BAB57}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{9FB55F6F-9A5B-4B8C-A1DD-374A431BAB57}.Release|Any CPU.Build.0 = Release|Any CPU
-		{9FB55F6F-9A5B-4B8C-A1DD-374A431BAB57}.Release|x64.ActiveCfg = Release|Any CPU
-		{9FB55F6F-9A5B-4B8C-A1DD-374A431BAB57}.Release|x64.Build.0 = Release|Any CPU
-		{9FB55F6F-9A5B-4B8C-A1DD-374A431BAB57}.Release|x86.ActiveCfg = Release|Any CPU
-		{9FB55F6F-9A5B-4B8C-A1DD-374A431BAB57}.Release|x86.Build.0 = Release|Any CPU
 		{E383A68D-1928-46F4-8896-4E99DF331476}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{E383A68D-1928-46F4-8896-4E99DF331476}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{E383A68D-1928-46F4-8896-4E99DF331476}.Debug|x64.ActiveCfg = Debug|Any CPU

+ 0 - 0
Unity/Assets/Scripts/Helper/MongoHelper.cs → Unity/Assets/Scripts/Base/Helper/MongoHelper.cs


+ 0 - 0
Unity/Assets/Scripts/Helper/MongoHelper.cs.meta → Unity/Assets/Scripts/Base/Helper/MongoHelper.cs.meta


+ 8 - 5
Unity/Unity.csproj

@@ -12,12 +12,15 @@
     <ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
     <TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
     <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
-    <TargetFrameworkProfile></TargetFrameworkProfile>
-    <CompilerResponseFile></CompilerResponseFile>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <CompilerResponseFile>
+    </CompilerResponseFile>
     <UnityProjectType>Game:1</UnityProjectType>
     <UnityBuildTarget>StandaloneWindows64:19</UnityBuildTarget>
     <UnityVersion>2017.1.1p4</UnityVersion>
-    <RootNamespace></RootNamespace>
+    <RootNamespace>
+    </RootNamespace>
     <LangVersion>6</LangVersion>
   </PropertyGroup>
   <PropertyGroup>
@@ -322,7 +325,7 @@
     <Compile Include="Assets\Scripts\Helper\DllHelper.cs" />
     <Compile Include="Assets\Scripts\Helper\GameObjectHelper.cs" />
     <Compile Include="Assets\Scripts\Helper\ILHelper.cs" />
-    <Compile Include="Assets\Scripts\Helper\MongoHelper.cs" />
+    <Compile Include="Assets\Scripts\Base\Helper\MongoHelper.cs" />
     <Compile Include="Assets\Scripts\Helper\PathHelper.cs" />
     <Compile Include="Assets\Scripts\Helper\PositionHelper.cs" />
     <Compile Include="Assets\Scripts\Helper\ResourceHelper.cs" />
@@ -579,4 +582,4 @@
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <Target Name="GenerateTargetFrameworkMonikerAttribute" />
-</Project>
+</Project>