diff --git a/ClientTester/EchoClientTester/EchoClientTester.csproj b/ClientTester/EchoClientTester/EchoClientTester.csproj
index 6c44a04..4a782ef 100644
--- a/ClientTester/EchoClientTester/EchoClientTester.csproj
+++ b/ClientTester/EchoClientTester/EchoClientTester.csproj
@@ -8,6 +8,12 @@
ClientTester
+
+
+ Always
+
+
+
diff --git a/ClientTester/EchoClientTester/Program.cs b/ClientTester/EchoClientTester/Program.cs
index 512ee14..1720943 100644
--- a/ClientTester/EchoClientTester/Program.cs
+++ b/ClientTester/EchoClientTester/Program.cs
@@ -1,3 +1,4 @@
+using System.Text.Json;
using ClientTester.DummyService;
using ClientTester.EchoDummyService;
using ClientTester.StressTest;
@@ -8,9 +9,23 @@ class EcoClientTester
{
public static string SERVER_IP = "localhost";
public static int SERVER_PORT = 9500;
- public static readonly string CONNECTION_KEY = "test";
+ public static string CONNECTION_KEY = "";
public static int CLIENT_COUNT = 50;
+ private static void LoadConfig()
+ {
+ string path = Path.Combine(AppContext.BaseDirectory, "appsettings.json");
+ if (!File.Exists(path)) return;
+
+ using JsonDocument doc = JsonDocument.Parse(File.ReadAllText(path));
+ JsonElement root = doc.RootElement;
+
+ if (root.TryGetProperty("ServerIp", out JsonElement ip)) SERVER_IP = ip.GetString() ?? SERVER_IP;
+ if (root.TryGetProperty("ServerPort", out JsonElement port)) SERVER_PORT = port.GetInt32();
+ if (root.TryGetProperty("ConnectionKey", out JsonElement key)) CONNECTION_KEY = key.GetString() ?? CONNECTION_KEY;
+ if (root.TryGetProperty("ClientCount", out JsonElement count)) CLIENT_COUNT = count.GetInt32();
+ }
+
private async Task StartEchoDummyTest()
{
try
@@ -151,6 +166,9 @@ class EcoClientTester
// 유니코드 문자(═, ║ 등) 콘솔 깨짐 방지
Console.OutputEncoding = System.Text.Encoding.UTF8;
+ // appsettings.json 에서 설정 로드
+ LoadConfig();
+
// 크래시 덤프 핸들러 (Release: .log + .dmp / Debug: .log)
CrashDumpHandler.Register();
@@ -169,7 +187,7 @@ class EcoClientTester
if (args.Length > 0 && args[0].Equals("stress", StringComparison.OrdinalIgnoreCase))
{
// 기본값
- CLIENT_COUNT = 50;
+ // CLIENT_COUNT = 50;
int duration = 60;
int sendInterval = 100;
int rampInterval = 1000;
diff --git a/MMOTestServer/MMOserver/Game/GameServer.cs b/MMOTestServer/MMOserver/Game/GameServer.cs
index 5bec060..8aec1e8 100644
--- a/MMOTestServer/MMOserver/Game/GameServer.cs
+++ b/MMOTestServer/MMOserver/Game/GameServer.cs
@@ -216,6 +216,11 @@ public class GameServer : ServerBase
continue;
}
+ if (channel.ChannelId >= 1000)
+ {
+ continue;
+ }
+
ChannelInfo info = new ChannelInfo();
info.ChannelId = channel.ChannelId;
info.ChannelUserCount = channel.UserCount;