diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 7b902122d..4244db3ed 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,9 +1,9 @@ - 7.2.0.50 - 9.0.2.50 - 9.0.2.73 + 7.2.0.51 + 9.0.2.51 + 9.0.2.74 diff --git a/src/Foundation/ThingsGateway.Foundation/Channel/IChannel.cs b/src/Foundation/ThingsGateway.Foundation/Channel/IChannel.cs index f69d0303c..51007a409 100644 --- a/src/Foundation/ThingsGateway.Foundation/Channel/IChannel.cs +++ b/src/Foundation/ThingsGateway.Foundation/Channel/IChannel.cs @@ -36,6 +36,10 @@ public interface IChannel : ISetupConfigObject, IDisposable, IClosableClient /// public bool Online { get; } + /// + /// MaxSign + /// + public int MaxSign { get; set; } /// /// 通道启动成功后 /// diff --git a/src/Foundation/ThingsGateway.Foundation/Channel/SerialPortChannel.cs b/src/Foundation/ThingsGateway.Foundation/Channel/SerialPortChannel.cs index 21c819156..bae517769 100644 --- a/src/Foundation/ThingsGateway.Foundation/Channel/SerialPortChannel.cs +++ b/src/Foundation/ThingsGateway.Foundation/Channel/SerialPortChannel.cs @@ -24,6 +24,7 @@ public class SerialPortChannel : SerialPortClient, IClientChannel { WaitHandlePool.MaxSign = ushort.MaxValue; } + public int MaxSign { get => WaitHandlePool.MaxSign; set => WaitHandlePool.MaxSign = value; } /// public ChannelReceivedEventHandler ChannelReceived { get; set; } = new(); diff --git a/src/Foundation/ThingsGateway.Foundation/Channel/TcpClientChannel.cs b/src/Foundation/ThingsGateway.Foundation/Channel/TcpClientChannel.cs index 5ac4a4298..e11c06db7 100644 --- a/src/Foundation/ThingsGateway.Foundation/Channel/TcpClientChannel.cs +++ b/src/Foundation/ThingsGateway.Foundation/Channel/TcpClientChannel.cs @@ -22,6 +22,7 @@ public class TcpClientChannel : TcpClient, IClientChannel { WaitHandlePool.MaxSign = ushort.MaxValue; } + public int MaxSign { get => WaitHandlePool.MaxSign; set => WaitHandlePool.MaxSign = value; } /// public ChannelReceivedEventHandler ChannelReceived { get; set; } = new(); diff --git a/src/Foundation/ThingsGateway.Foundation/Channel/TcpServiceChannel.cs b/src/Foundation/ThingsGateway.Foundation/Channel/TcpServiceChannel.cs index ba3a612db..9a945d774 100644 --- a/src/Foundation/ThingsGateway.Foundation/Channel/TcpServiceChannel.cs +++ b/src/Foundation/ThingsGateway.Foundation/Channel/TcpServiceChannel.cs @@ -188,9 +188,11 @@ public class TcpServiceChannel : TcpServiceChannelBase, /// protected override TcpSessionClientChannel NewClient() { - return new TcpSessionClientChannel(); + var data = new TcpSessionClientChannel(); + data.WaitHandlePool.MaxSign = MaxSign; + return data; } - + public int MaxSign { get; set; } /// protected override async Task OnTcpClosing(TcpSessionClientChannel socketClient, ClosingEventArgs e) { diff --git a/src/Foundation/ThingsGateway.Foundation/Channel/TcpSessionClientChannel.cs b/src/Foundation/ThingsGateway.Foundation/Channel/TcpSessionClientChannel.cs index a6a6b5f91..689668f93 100644 --- a/src/Foundation/ThingsGateway.Foundation/Channel/TcpSessionClientChannel.cs +++ b/src/Foundation/ThingsGateway.Foundation/Channel/TcpSessionClientChannel.cs @@ -20,6 +20,7 @@ public class TcpSessionClientChannel : TcpSessionClient, IClientChannel { WaitHandlePool.MaxSign = ushort.MaxValue; } + public int MaxSign { get => WaitHandlePool.MaxSign; set => WaitHandlePool.MaxSign = value; } /// public ChannelReceivedEventHandler ChannelReceived { get; set; } = new(); diff --git a/src/Foundation/ThingsGateway.Foundation/Channel/UdpSessionChannel.cs b/src/Foundation/ThingsGateway.Foundation/Channel/UdpSessionChannel.cs index 37f01959d..ad31c905f 100644 --- a/src/Foundation/ThingsGateway.Foundation/Channel/UdpSessionChannel.cs +++ b/src/Foundation/ThingsGateway.Foundation/Channel/UdpSessionChannel.cs @@ -22,6 +22,7 @@ public class UdpSessionChannel : UdpSession, IClientChannel { WaitHandlePool.MaxSign = ushort.MaxValue; } + public int MaxSign { get => WaitHandlePool.MaxSign; set => WaitHandlePool.MaxSign = value; } /// public ChannelReceivedEventHandler ChannelReceived { get; set; } = new(); @@ -52,7 +53,7 @@ public class UdpSessionChannel : UdpSession, IClientChannel /// /// 等待池 /// - public WaitHandlePool WaitHandlePool { get; } = new(); + public WaitHandlePool WaitHandlePool { get; set; } = new(); /// public WaitLock WaitLock { get; } = new WaitLock(); diff --git a/src/FoundationVersion.props b/src/FoundationVersion.props index 743351d4f..8db3338e3 100644 --- a/src/FoundationVersion.props +++ b/src/FoundationVersion.props @@ -1,6 +1,6 @@ - 9.0.2.36 + 9.0.2.37 diff --git a/src/Gateway/ThingsGateway.Gateway.Application/ThingsGateway.Gateway.Application.csproj b/src/Gateway/ThingsGateway.Gateway.Application/ThingsGateway.Gateway.Application.csproj index 3bce36bd7..64c0fefa0 100644 --- a/src/Gateway/ThingsGateway.Gateway.Application/ThingsGateway.Gateway.Application.csproj +++ b/src/Gateway/ThingsGateway.Gateway.Application/ThingsGateway.Gateway.Application.csproj @@ -1,35 +1,38 @@ - - + + - - - - + + + + + - - - + - - - - Never - - + + + - - - - PreserveNewest - - + + + + Never + + + + + + + PreserveNewest + + - - - - + + + + diff --git a/src/Gateway/ThingsGateway.Gateway.Razor/ThingsGateway.Gateway.Razor.csproj b/src/Gateway/ThingsGateway.Gateway.Razor/ThingsGateway.Gateway.Razor.csproj index 12d1e29bc..39fe475ff 100644 --- a/src/Gateway/ThingsGateway.Gateway.Razor/ThingsGateway.Gateway.Razor.csproj +++ b/src/Gateway/ThingsGateway.Gateway.Razor/ThingsGateway.Gateway.Razor.csproj @@ -4,8 +4,8 @@ - - + + diff --git a/src/Version.props b/src/Version.props index 5c127c8db..b623c419b 100644 --- a/src/Version.props +++ b/src/Version.props @@ -1,6 +1,6 @@ - 7.2.0.73 + 7.2.0.75