lith 5 vuotta sitten
vanhempi
commit
4303190e09
35 muutettua tiedostoa jossa 90 lisäystä ja 40 poistoa
  1. 7 2
      dotnet/Doc/UpgradeLog/Sers2.1.1.txt
  2. 1 1
      dotnet/Sers/ApiLoader/Sers.NetcoreLoader/Sers.NetcoreLoader.csproj
  3. 1 1
      dotnet/Sers/ApiLoader/Sers.Serslot/Sers.Serslot.csproj
  4. 1 1
      dotnet/Sers/Sers.CL/Ipc/Sers.CL.Ipc.SharedMemory/Sers.CL.Ipc.SharedMemory.csproj
  5. 1 1
      dotnet/Sers/Sers.CL/Socket/Sers.CL.Socket.Iocp/Sers.CL.Socket.Iocp.csproj
  6. 1 1
      dotnet/Sers/Sers.CL/Socket/Sers.CL.Socket.ThreadWait/Sers.CL.Socket.ThreadWait.csproj
  7. 1 1
      dotnet/Sers/Sers.CL/WebSocket/Sers.CL.WebSocket/Sers.CL.WebSocket.csproj
  8. 1 1
      dotnet/Sers/Sers.CL/Zmq/FullDuplex/Sers.CL.Zmq.FullDuplex/Sers.CL.Zmq.FullDuplex.csproj
  9. 1 1
      dotnet/Sers/Sers.CL/Zmq/ThreadWait/Sers.CL.ClrZmq.ThreadWait/Sers.CL.ClrZmq.ThreadWait.csproj
  10. 9 2
      dotnet/Sers/Sers.Core/Sers.Core/CL/MessageOrganize/DefaultOrganize/OrganizeConnection.cs
  11. 2 5
      dotnet/Sers/Sers.Core/Sers.Core/CL/MessageOrganize/DefaultOrganize/RequestAdaptor.cs
  12. 3 0
      dotnet/Sers/Sers.Core/Sers.Core/CL/MessageOrganize/IOrganizeConnection.cs
  13. 1 1
      dotnet/Sers/Sers.Core/Sers.Core/Sers.Core.csproj
  14. 1 1
      dotnet/Sers/Sers.Gateway/Sers.Gateway/Sers.Gateway.csproj
  15. 1 1
      dotnet/Sers/Sers.Hardware/Sers.Hardware/Sers.Hardware.csproj
  16. 1 1
      dotnet/Sers/Sers.Ioc/Sers.Ioc/Sers.Ioc.csproj
  17. 14 1
      dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Base/GoverManage.cs
  18. 2 2
      dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Base/ServiceStationMng.cs
  19. 14 2
      dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controller/ApiControllers/ServerStationController.cs
  20. 4 0
      dotnet/Sers/Sers.ServiceCenter/Sers.ServiceCenter/ServiceCenter.cs
  21. 1 1
      dotnet/Sers/Sers.ServiceStation/Sers.ServiceStation/Sers.ServiceStation.csproj
  22. 1 1
      dotnet/StationDemo/SersLoader/Did.SersLoader.Demo/Did.SersLoader.Demo.csproj
  23. 1 1
      dotnet/StationDemo/SersLoader/Did.SersLoader.HelloWorld/Did.SersLoader.HelloWorld.csproj
  24. 1 1
      dotnet/Vit/Vit.Core/Vit.Core/Vit.Core.csproj
  25. 1 1
      dotnet/Vit/Vit.Ioc/Vit.Ioc/Vit.Ioc.csproj
  26. 1 1
      dotnet/Vit/Vit.Net.Http.FormFile/Vit.Net.Http.FormFile.csproj
  27. 1 1
      dotnet/Vit/Vit.WebHost/Vit.WebHost.csproj
  28. 1 1
      dotnet/netcore/Gateway/App.Gateway/App.Gateway.csproj
  29. 1 1
      dotnet/netcore/ServiceCenter/App.Gover.Gateway/App.Gover.Gateway.csproj
  30. 4 1
      dotnet/netcore/ServiceCenter/App.Gover.Gateway/wwwroot/_gover_/Scripts/Sers/sers.apiClient.js
  31. 6 1
      dotnet/netcore/ServiceCenter/App.Gover.Gateway/wwwroot/_gover_/ServiceStationMng.html
  32. 1 1
      dotnet/netcore/ServiceCenter/App.ServiceCenter/App.ServiceCenter.csproj
  33. 1 1
      dotnet/netcore/Station/App.Ioc.Station/App.Ioc.Station.csproj
  34. 1 1
      dotnet/netcore/Station/App.Robot.Station/App.Robot.Station.csproj
  35. 1 0
      一键发布nuget包并上传.bat

+ 7 - 2
dotnet/Doc/UpgradeLog/Sers2.1.1.txt

@@ -65,6 +65,11 @@ ApiClient
 ------------------------------------------------------------------------------------------------------------------
 优化ApiLoader效率,减少不必要的SsApiDesc的构建
 
-
-[tag]Sers2.1.1.294
+[tag]Sers2.1.1.296
 ------------------------------------------------------------------------------------------------------------------
+SersKit修复邮件在linux中不能发送的bug
+
+ServiceCenter添加强制关闭服务站点功能
+
+[tag]Sers2.1.1.297
+------------------------------------------------------------------------------------------------------------------

+ 1 - 1
dotnet/Sers/ApiLoader/Sers.NetcoreLoader/Sers.NetcoreLoader.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/ApiLoader/Sers.Serslot/Sers.Serslot.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.CL/Ipc/Sers.CL.Ipc.SharedMemory/Sers.CL.Ipc.SharedMemory.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.CL/Socket/Sers.CL.Socket.Iocp/Sers.CL.Socket.Iocp.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.CL/Socket/Sers.CL.Socket.ThreadWait/Sers.CL.Socket.ThreadWait.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.CL/WebSocket/Sers.CL.WebSocket/Sers.CL.WebSocket.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.CL/Zmq/FullDuplex/Sers.CL.Zmq.FullDuplex/Sers.CL.Zmq.FullDuplex.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
   

+ 1 - 1
dotnet/Sers/Sers.CL/Zmq/ThreadWait/Sers.CL.ClrZmq.ThreadWait/Sers.CL.ClrZmq.ThreadWait.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
   

+ 9 - 2
dotnet/Sers/Sers.Core/Sers.Core/CL/MessageOrganize/DefaultOrganize/OrganizeConnection.cs

@@ -4,7 +4,7 @@ using Sers.Core.CL.MessageDelivery;
 
 namespace Sers.Core.CL.MessageOrganize.DefaultOrganize
 {
-    public class OrganizeConnection:IOrganizeConnection
+    public class OrganizeConnection : IOrganizeConnection
     {
         public string connTag { get; set; }
 
@@ -30,8 +30,15 @@ namespace Sers.Core.CL.MessageOrganize.DefaultOrganize
         }
         public bool SendRequest(List<ArraySegment<byte>> requestData, out List<ArraySegment<byte>> replyData)
         {
-           return requestAdaptor.SendRequest(this,requestData, out replyData);
+            return requestAdaptor.SendRequest(this, requestData, out replyData);
         }
+
+        public void Close() 
+        {
+            deliveryConn?.Close();
+            deliveryConn = null;
+        }
+
     }
 
 

+ 2 - 5
dotnet/Sers/Sers.Core/Sers.Core/CL/MessageOrganize/DefaultOrganize/RequestAdaptor.cs

@@ -634,11 +634,8 @@ namespace Sers.Core.CL.MessageOrganize.DefaultOrganize
             {
                 if (info.IsDisconnected(heartBeatRetryCount))
                 {
-                    var deliveryConn = conn.GetDeliveryConn();
-                    if (deliveryConn!= null){
-                        Logger.Info("[CL.RequestAdaptor]HeartBeat,conn disconnected. connTag:" + conn.connTag);
-                        deliveryConn.Close();
-                    }
+                    Logger.Info("[CL.RequestAdaptor]HeartBeat,conn disconnected. connTag:" + conn.connTag);
+                    conn.Close();                    
                     return;
                 }
             }

+ 3 - 0
dotnet/Sers/Sers.Core/Sers.Core/CL/MessageOrganize/IOrganizeConnection.cs

@@ -12,5 +12,8 @@ namespace Sers.Core.CL.MessageOrganize
 
         void SendRequestAsync(Object sender, List<ArraySegment<byte>> requestData, Action<object, List<ArraySegment<byte>>> callback);
         bool SendRequest(List<ArraySegment<byte>> requestData, out List<ArraySegment<byte>> replyData);
+
+
+        void Close();
     }
 }

+ 1 - 1
dotnet/Sers/Sers.Core/Sers.Core/Sers.Core.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.Gateway/Sers.Gateway/Sers.Gateway.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.Hardware/Sers.Hardware/Sers.Hardware.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Sers/Sers.Ioc/Sers.Ioc/Sers.Ioc.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 14 - 1
dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Base/GoverManage.cs

@@ -249,7 +249,8 @@ namespace Sers.Gover.Base
 
         public override void ServiceStation_Remove(IOrganizeConnection  conn)
         {
-            var serviceStation = serviceStationMng.ServiceStation_Remove(conn);
+            string connKey = ""+ conn.GetHashCode();
+            var serviceStation = serviceStationMng.ServiceStation_Remove(connKey);
             if (serviceStation != null)
             {
                 Logger.Info("[ApiCenterService]Remove serviceStation,stationName:" + serviceStation?.serviceStationInfo?.serviceStationName);
@@ -276,6 +277,18 @@ namespace Sers.Gover.Base
             }
             return serviceStation != null; 
         }
+
+        public bool ServiceStation_Stop(string connKey)
+        {
+            var serviceStation = serviceStationMng.ServiceStation_Remove(connKey);
+            if (serviceStation != null)
+            {
+                Logger.Info("[ApiCenterService]Stop serviceStation,stationName:" + serviceStation?.serviceStationInfo?.serviceStationName);
+                serviceStation.connection.Close();
+            }
+            return serviceStation != null;
+        }
+
         #endregion
 
 

+ 2 - 2
dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Base/ServiceStationMng.cs

@@ -115,9 +115,9 @@ namespace Sers.Gover.Base
 
 
 
-        public ServiceStation ServiceStation_Remove(IOrganizeConnection  conn)
+        public ServiceStation ServiceStation_Remove(string connKey)
         {           
-            if (!serviceStation_ConnKey_Map.TryRemove(conn.GetHashCode(), out var serviceStation))
+            if (!serviceStation_ConnKey_Map.TryRemove(int.Parse(connKey), out var serviceStation))
             {
                 return null;
             }

+ 14 - 2
dotnet/Sers/Sers.ServiceCenter/Sers.Gover/Controller/ApiControllers/ServerStationController.cs

@@ -52,10 +52,22 @@ namespace Sers.Gover.Controller.ApiControllers
         {
             return new ApiReturn { success = GoverManage.Instance.ServiceStation_Start(connKey) };
         }
-         
 
 
-     
+
+        /// <summary>
+        /// 启用指定的服务站点
+        /// </summary>
+        /// <returns></returns>
+        [SsRoute("serviceStation/stop")]
+        [SsCallerSource(ECallerSource.Internal)]
+        //[CallFromGover]
+        [SsName("启用指定的服务站点")]
+        public ApiReturn Stop(string connKey)
+        {
+            return new ApiReturn { success = GoverManage.Instance.ServiceStation_Stop(connKey) };
+        }
+
 
 
 

+ 4 - 0
dotnet/Sers/Sers.ServiceCenter/Sers.ServiceCenter/ServiceCenter.cs

@@ -110,6 +110,10 @@ namespace Sers.ServiceCenter
             {
                 MessageClient.Instance.OnGetMessage(this, message.ByteDataToArraySegment());
             }
+            public void Close() 
+            {
+            }
+
         }
 
 

+ 1 - 1
dotnet/Sers/Sers.ServiceStation/Sers.ServiceStation/Sers.ServiceStation.csproj

@@ -3,7 +3,7 @@
  
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/StationDemo/SersLoader/Did.SersLoader.Demo/Did.SersLoader.Demo.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>

+ 1 - 1
dotnet/StationDemo/SersLoader/Did.SersLoader.HelloWorld/Did.SersLoader.HelloWorld.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Vit/Vit.Core/Vit.Core/Vit.Core.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Vit/Vit.Ioc/Vit.Ioc/Vit.Ioc.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Vit/Vit.Net.Http.FormFile/Vit.Net.Http.FormFile.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/Vit/Vit.WebHost/Vit.WebHost.csproj

@@ -2,7 +2,7 @@
 
   <PropertyGroup>
     <TargetFramework>netstandard2.0</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/netcore/Gateway/App.Gateway/App.Gateway.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/netcore/ServiceCenter/App.Gover.Gateway/App.Gover.Gateway.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 4 - 1
dotnet/netcore/ServiceCenter/App.Gover.Gateway/wwwroot/_gover_/Scripts/Sers/sers.apiClient.js

@@ -120,7 +120,9 @@
         obj.post({ api: '/_gover_/serviceStation/pause', arg: { connKey: connKey }, onSuc: onSuc });  
     };
 
-
+    obj.serviceStation_stop = function (connKey, onSuc) {
+        obj.post({ api: '/_gover_/serviceStation/stop', arg: { connKey: connKey }, onSuc: onSuc });
+    };
 
 
     obj.apiStation_getAll = function (onSuc) {
@@ -135,6 +137,7 @@
         obj.post({ api: '/_gover_/apiStation/pause', arg: { stationName: stationName }, onSuc: onSuc });  
     };
 
+   
 
 
 })('undefined' != typeof (sers) ? sers : (sers = {}));

+ 6 - 1
dotnet/netcore/ServiceCenter/App.Gover.Gateway/wwwroot/_gover_/ServiceStationMng.html

@@ -31,7 +31,7 @@
             {{station.apiStationNames}} <br />
             stationVersion:{{ (station.serviceStationInfo||{}).stationVersion }}<br />
             状态:{{station.status}}(正常、暂停)<br />
-            操作:  <a href="#" @click="start(station)">打开</a>   <a href="#" @click="pause(station)">暂停</a><br />
+            操作:  <a href="#" @click="start(station)">打开</a>   <a href="#" @click="pause(station)">暂停</a>  <a href="#" @click="stop(station)">强制关闭</a> <br />
             -----------------------<br />
             apiNodeCount:{{station.apiNodeCount}} <br />
             activeApiNodeCount:{{station.activeApiNodeCount}}     <br />
@@ -78,6 +78,11 @@
                     sers.apiClient.serviceStation_pause(station.connKey, function (data) {
                         rendStations();
                     });
+                }, stop: function (station) {
+                    if (!confirm('手动关闭服务站点后,服务站点不一定会自动重新连接,确定继续吗?')) return;
+                    sers.apiClient.serviceStation_stop(station.connKey, function (data) {
+                        rendStations();
+                    });
                 }
             }
         });

+ 1 - 1
dotnet/netcore/ServiceCenter/App.ServiceCenter/App.ServiceCenter.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/netcore/Station/App.Ioc.Station/App.Ioc.Station.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 1
dotnet/netcore/Station/App.Robot.Station/App.Robot.Station.csproj

@@ -4,7 +4,7 @@
     <OutputType>Exe</OutputType>
     <TargetFramework>netcoreapp2.1</TargetFramework>
     <RunPostBuildEvent>Always</RunPostBuildEvent>
-    <Version>2.1.1.294</Version>
+    <Version>2.1.1.297</Version>
     <Description>https://github.com/sersms/Sers/tree/2.1.1/release</Description>
   </PropertyGroup>
 

+ 1 - 0
一键发布nuget包并上传.bat

@@ -1,6 +1,7 @@
 cd /d "dotnet\Doc\Release"
 call "pack sers_lib.bat"
 call "push sers_lib to SersNugetServer.bat"
+call "publish sers.bat"
 
 cd /d ../../../