using ClientTester.EchoDummyService; using Serilog; Log.Logger = new LoggerConfiguration() .WriteTo.Console() .CreateLogger(); const string SERVER_IP = "localhost"; const int SERVER_PORT = 9500; const string CONNECTION_KEY = "game"; const int CLIENT_COUNT = 1000; var cts = new CancellationTokenSource(); Console.CancelKeyPress += (_, e) => { e.Cancel = true; Log.Warning("[SHUTDOWN] Ctrl+C 감지, 종료 중..."); cts.Cancel(); }; var service = new DummyClientService(CLIENT_COUNT, SERVER_IP, SERVER_PORT, CONNECTION_KEY, 100); await service.RunAsync(cts.Token); service.PrintStats(); service.Stop(); Log.CloseAndFlush();