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 {