From 9b1e7f447ec1122f6e783d0c861fdbe1e08ebf0b Mon Sep 17 00:00:00 2001 From: CaesarBao <445720029@qq.com> Date: Mon, 23 Sep 2024 13:49:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SlnMesnac.TouchSocket/TcpServer.cs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/SlnMesnac.TouchSocket/TcpServer.cs b/SlnMesnac.TouchSocket/TcpServer.cs index f14fc8d..dcc5056 100644 --- a/SlnMesnac.TouchSocket/TcpServer.cs +++ b/SlnMesnac.TouchSocket/TcpServer.cs @@ -34,7 +34,7 @@ using TouchSocket.Sockets; #endregion << 版 本 注 释 >> namespace SlnMesnac.TouchSocket { - public class TcpServer : BackgroundService + public class TcpServer { private ILogger _logger; @@ -87,14 +87,8 @@ namespace SlnMesnac.TouchSocket _service = tcpService; _appConfig = appConfig; } - - protected override Task ExecuteAsync(CancellationToken stoppingToken) - { - Init(_appConfig.TCPVisionConfig); - return Task.CompletedTask; - } - - public void Init(string serverPort) + + public void Init(int serverPort) { try {