first commit
This commit is contained in:
361
ClientTester/.editorconfig
Normal file
361
ClientTester/.editorconfig
Normal file
@@ -0,0 +1,361 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.cs]
|
||||
# -------------------------------------------------------------------------
|
||||
# 중괄호 Allman 스타일
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: Bad:
|
||||
# if (isAlive) if (isAlive) {
|
||||
# { TakeDamage();
|
||||
# TakeDamage(); }
|
||||
# }
|
||||
csharp_new_line_before_open_brace = all
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# 중괄호 항상 사용
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: Bad:
|
||||
# if (isAlive) if (isAlive)
|
||||
# { TakeDamage();
|
||||
# TakeDamage();
|
||||
# }
|
||||
csharp_prefer_braces = true:warning
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# 접근 제한자 항상 명시
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: Bad:
|
||||
# private int health; int health;
|
||||
# public float moveSpeed; float moveSpeed;
|
||||
dotnet_style_require_accessibility_modifiers = always:warning
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# this. 한정자 허용 (필드와 매개변수 이름이 같을 때 필요)
|
||||
# -------------------------------------------------------------------------
|
||||
# 허용: this.stateContext = stateContext; (매개변수와 필드명 동일 시)
|
||||
# 불필요: this.Initialize(); (모호하지 않은 경우)
|
||||
dotnet_style_qualification_for_field = false:suggestion
|
||||
dotnet_style_qualification_for_property = false:suggestion
|
||||
dotnet_style_qualification_for_method = false:suggestion
|
||||
dotnet_style_qualification_for_event = false:suggestion
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# var 사용 금지
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: Bad:
|
||||
# Enemy enemy = GetEnemy(); var enemy = GetEnemy();
|
||||
# int count = 0; var count = 0;
|
||||
csharp_style_var_for_built_in_types = false:warning
|
||||
csharp_style_var_when_type_is_apparent = false:warning
|
||||
csharp_style_var_elsewhere = false:warning
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# null 체크 스타일 강제
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: Bad:
|
||||
# animator?.Play("Run"); if (animator != null) animator.Play("Run");
|
||||
# string name = playerName ?? "Unknown"; string name = playerName != null ? playerName : "Unknown";
|
||||
# if (obj is null) { } if (object.ReferenceEquals(obj, null)) { }
|
||||
csharp_style_conditional_delegate_call = true:warning
|
||||
dotnet_style_null_propagation = true:warning
|
||||
dotnet_style_coalesce_expression = true:warning
|
||||
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# 패턴 매칭 강제 (as + null 체크 대신 is 패턴 사용)
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: Bad:
|
||||
# if (obj is Enemy enemy) Enemy enemy = obj as Enemy;
|
||||
# { if (enemy != null)
|
||||
# enemy.TakeDamage(); {
|
||||
# } enemy.TakeDamage();
|
||||
# }
|
||||
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
|
||||
csharp_style_pattern_matching_over_as_with_null_check = true:warning
|
||||
# not 패턴 (C# 9+)
|
||||
# Good: if (obj is not null) Bad: if (!(obj is null))
|
||||
# Good: if (enemy is not Dead) Bad: if (!(enemy is Dead))
|
||||
csharp_style_prefer_not_pattern = true:warning
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# throw 표현식 강제
|
||||
# -------------------------------------------------------------------------
|
||||
# Good:
|
||||
# target = player ?? throw new ArgumentNullException(nameof(player));
|
||||
#
|
||||
# Bad:
|
||||
# if (player == null) throw new ArgumentNullException(nameof(player));
|
||||
# target = player;
|
||||
csharp_style_throw_expression = true:warning
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# 인라인 변수 선언 강제
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: Bad:
|
||||
# TryGetComponent(out Rigidbody rb); Rigidbody rb;
|
||||
# TryGetComponent(out rb);
|
||||
csharp_style_inlined_variable_declaration = true:warning
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# 튜플 해체 선언
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: Bad:
|
||||
# var (x, y) = GetPosition(); var pos = GetPosition();
|
||||
# var x = pos.x; var y = pos.y;
|
||||
csharp_style_deconstructed_variable_declaration = true:suggestion
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# 간단한 using 선언문
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: Bad:
|
||||
# using var stream = File.Open(...); using (var stream = File.Open(...))
|
||||
# {
|
||||
# }
|
||||
csharp_prefer_simple_using_statement = true:suggestion
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# 인덱스 / 범위 연산자 (C# 8+)
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: items[^1] Bad: items[items.Length - 1]
|
||||
# Good: items[1..3] Bad: items.Skip(1).Take(2)
|
||||
csharp_style_prefer_index_from_end = true:suggestion
|
||||
csharp_style_prefer_range_operator = true:suggestion
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# switch 표현식 권장
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: Bad:
|
||||
# string label = state switch string label;
|
||||
# { switch (state)
|
||||
# GameState.Playing => "Playing", {
|
||||
# GameState.Paused => "Paused", case GameState.Playing: label = "Playing"; break;
|
||||
# _ => "Unknown" case GameState.Paused: label = "Paused"; break;
|
||||
# }; default: label = "Unknown"; break;
|
||||
# }
|
||||
csharp_style_prefer_switch_expression = true:suggestion
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# 불필요한 코드 제거
|
||||
# -------------------------------------------------------------------------
|
||||
# object initializer
|
||||
# Good: Bad:
|
||||
# Enemy enemy = new Enemy Enemy enemy = new Enemy();
|
||||
# { enemy.hp = 100;
|
||||
# hp = 100, enemy.name = "Goblin";
|
||||
# name = "Goblin"
|
||||
# };
|
||||
#
|
||||
# 미사용 반환값은 _ 로 명시적으로 버리기
|
||||
# Good: Bad:
|
||||
# _ = TryGetComponent(out Rigidbody rb); TryGetComponent(out Rigidbody rb);
|
||||
dotnet_style_object_initializer = true:warning
|
||||
dotnet_style_collection_initializer = true:warning
|
||||
dotnet_remove_unnecessary_suppression_exclusions = true
|
||||
csharp_style_unused_value_assignment_preference = discard_variable:warning
|
||||
csharp_style_unused_value_expression_statement_preference = discard_variable:warning
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# 단순화 강제
|
||||
# -------------------------------------------------------------------------
|
||||
# auto property
|
||||
# Good: Bad:
|
||||
# public int Hp { get; private set; } private int hp;
|
||||
# public int Hp { get { return hp; } }
|
||||
#
|
||||
# boolean 단순화
|
||||
# Good: Bad:
|
||||
# return isAlive; return isAlive == true;
|
||||
#
|
||||
# 삼항 연산자 (suggestion - 복잡한 경우 강제 안 함)
|
||||
# Good: Bad:
|
||||
# int damage = isCrit ? 200 : 100; int damage;
|
||||
# if (isCrit) damage = 200;
|
||||
# else damage = 100;
|
||||
dotnet_style_prefer_auto_properties = true:warning
|
||||
dotnet_style_prefer_simplified_boolean_expressions = true:warning
|
||||
dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
|
||||
dotnet_style_prefer_conditional_expression_over_return = true:suggestion
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# 복합 할당 연산자
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: hp -= damage; Bad: hp = hp - damage;
|
||||
# Good: score += point; Bad: score = score + point;
|
||||
dotnet_style_prefer_compound_assignment = true:warning
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# 타입 예약어 강제 (BCL 타입명 대신 C# 예약어 사용)
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: Bad:
|
||||
# int count = 0; Int32 count = 0;
|
||||
# string name = "Player"; String name = "Player";
|
||||
# object obj = new Enemy(); Object obj = new Enemy();
|
||||
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
|
||||
dotnet_style_predefined_type_for_member_access = true:warning
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# expression-bodied 프로퍼티/접근자 강제, 메서드/생성자/로컬함수 금지
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: Bad:
|
||||
# public int CurrentHp => currentHp; public int CurrentHp
|
||||
# {
|
||||
# get { return currentHp; }
|
||||
# }
|
||||
#
|
||||
# 메서드 / 생성자 / 로컬 함수는 expression-bodied 금지
|
||||
# Good: Bad:
|
||||
# public void TakeDamage(int damage) public void TakeDamage(int damage) => hp -= damage;
|
||||
# {
|
||||
# hp -= damage;
|
||||
# }
|
||||
csharp_style_expression_bodied_properties = true:warning
|
||||
csharp_style_expression_bodied_accessors = true:warning
|
||||
csharp_style_expression_bodied_indexers = true:warning
|
||||
csharp_style_expression_bodied_operators = true:warning
|
||||
csharp_style_expression_bodied_lambdas = true:suggestion
|
||||
csharp_style_expression_bodied_methods = false:warning
|
||||
csharp_style_expression_bodied_constructors = false:warning
|
||||
csharp_style_expression_bodied_local_functions = false:warning
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# 한 줄 블록 금지 (포맷터 적용 시 자동 정리)
|
||||
# -------------------------------------------------------------------------
|
||||
# Good: Bad:
|
||||
# if (isAlive) if (isAlive) { TakeDamage(); }
|
||||
# {
|
||||
# TakeDamage();
|
||||
# }
|
||||
# 주의: 이 설정은 경고가 아닌 포맷터 실행 시에만 적용됩니다.
|
||||
csharp_preserve_single_line_blocks = false
|
||||
csharp_preserve_single_line_statements = false
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# using 정렬
|
||||
# -------------------------------------------------------------------------
|
||||
# Good:
|
||||
# using System.Collections;
|
||||
# using System.Collections.Generic;
|
||||
# using UnityEngine;
|
||||
dotnet_sort_system_directives_first = true
|
||||
dotnet_separate_import_directive_groups = false
|
||||
csharp_using_directive_placement = outside_namespace:warning
|
||||
# 네임스페이스는 폴더 구조와 일치
|
||||
# Good: Assets/Scripts/Player/ → namespace Project.Player
|
||||
dotnet_style_namespace_match_folder = true:suggestion
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# 네이밍 규칙
|
||||
# -------------------------------------------------------------------------
|
||||
# 주의: 더 구체적인 규칙(const 등)을 먼저 선언해야 올바르게 적용됩니다.
|
||||
|
||||
# 상수: UPPER_SNAKE_CASE (const modifier로 가장 구체적 → 최우선)
|
||||
# Good: const int MAX_LEVEL = 100; Bad: const int MaxLevel = 100;
|
||||
# Good: const float DEFAULT_SPEED = 5f; Bad: const float defaultSpeed = 5f;
|
||||
dotnet_naming_rule.constants.severity = warning
|
||||
dotnet_naming_rule.constants.symbols = constants
|
||||
dotnet_naming_rule.constants.style = upper_snake_case
|
||||
|
||||
dotnet_naming_symbols.constants.applicable_kinds = field
|
||||
dotnet_naming_symbols.constants.required_modifiers = const
|
||||
|
||||
dotnet_naming_style.upper_snake_case.capitalization = all_upper
|
||||
dotnet_naming_style.upper_snake_case.word_separator = _
|
||||
|
||||
# private / protected 필드: camelCase (Unity 스타일 통일)
|
||||
# Good: private int currentHp; Bad: private int _currentHp;
|
||||
# Good: protected float baseSpeed; Bad: protected float _baseSpeed;
|
||||
dotnet_naming_rule.private_fields.severity = warning
|
||||
dotnet_naming_rule.private_fields.symbols = private_fields
|
||||
dotnet_naming_rule.private_fields.style = camel_case_style
|
||||
|
||||
dotnet_naming_symbols.private_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal
|
||||
|
||||
# public 필드: camelCase (Unity Inspector 노출 필드 기준 - 일반 C# 컨벤션과 다름)
|
||||
# Good: public float moveSpeed; Bad: public float MoveSpeed;
|
||||
# Good: public int maxHealth; Bad: public int MaxHealth;
|
||||
dotnet_naming_rule.public_fields.severity = warning
|
||||
dotnet_naming_rule.public_fields.symbols = public_fields
|
||||
dotnet_naming_rule.public_fields.style = camel_case_style
|
||||
|
||||
dotnet_naming_symbols.public_fields.applicable_kinds = field
|
||||
dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal
|
||||
|
||||
dotnet_naming_style.camel_case_style.capitalization = camel_case
|
||||
|
||||
# 인터페이스: IPascalCase
|
||||
# Good: interface IEnemy { } Bad: interface Enemy { }
|
||||
# Good: interface IDamageable { } Bad: interface Damageable { }
|
||||
dotnet_naming_rule.interfaces.severity = warning
|
||||
dotnet_naming_rule.interfaces.symbols = interfaces
|
||||
dotnet_naming_rule.interfaces.style = prefix_i
|
||||
|
||||
dotnet_naming_symbols.interfaces.applicable_kinds = interface
|
||||
|
||||
dotnet_naming_style.prefix_i.capitalization = pascal_case
|
||||
dotnet_naming_style.prefix_i.required_prefix = I
|
||||
|
||||
# 클래스 / 구조체 / 열거형: PascalCase
|
||||
# Good: class PlayerController { } Bad: class playerController { }
|
||||
# Good: enum GameState { } Bad: enum gameState { }
|
||||
dotnet_naming_rule.types.severity = warning
|
||||
dotnet_naming_rule.types.symbols = types
|
||||
dotnet_naming_rule.types.style = pascal_case_style
|
||||
|
||||
dotnet_naming_symbols.types.applicable_kinds = class, struct, enum, delegate
|
||||
|
||||
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
|
||||
|
||||
# 메서드 / 프로퍼티 / 이벤트: PascalCase
|
||||
# Good: public void TakeDamage() { } Bad: public void takeDamage() { }
|
||||
# Good: public int CurrentHp { } Bad: public int currentHp { }
|
||||
# Good: public event Action OnDeath; Bad: public event Action onDeath;
|
||||
dotnet_naming_rule.members.severity = warning
|
||||
dotnet_naming_rule.members.symbols = members
|
||||
dotnet_naming_rule.members.style = pascal_case_style
|
||||
|
||||
dotnet_naming_symbols.members.applicable_kinds = method, property, event
|
||||
|
||||
# 매개변수 / 로컬 변수: camelCase
|
||||
# Good: void Init(int maxHp) { } Bad: void Init(int MaxHp) { }
|
||||
# Good: float moveSpeed = 5f; Bad: float MoveSpeed = 5f;
|
||||
dotnet_naming_rule.parameters_and_locals.severity = warning
|
||||
dotnet_naming_rule.parameters_and_locals.symbols = parameters_and_locals
|
||||
dotnet_naming_rule.parameters_and_locals.style = camel_case_style
|
||||
|
||||
dotnet_naming_symbols.parameters_and_locals.applicable_kinds = parameter, local
|
||||
|
||||
# enum 멤버: PascalCase
|
||||
# Good: GameState.Playing Bad: GameState.playing
|
||||
# Good: GameState.GameOver Bad: GameState.GAME_OVER
|
||||
dotnet_naming_rule.enum_members.severity = warning
|
||||
dotnet_naming_rule.enum_members.symbols = enum_members
|
||||
dotnet_naming_rule.enum_members.style = pascal_case_style
|
||||
|
||||
dotnet_naming_symbols.enum_members.applicable_kinds = enum_member
|
||||
|
||||
[*.{json,yaml,yml}]
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{asmdef,asmref}]
|
||||
indent_size = 4
|
||||
|
||||
[*.shader]
|
||||
indent_size = 4
|
||||
|
||||
[*.{compute,hlsl,cginc}]
|
||||
indent_size = 4
|
||||
|
||||
[*.{uss,uxml}]
|
||||
indent_size = 4
|
||||
16
ClientTester/ClientTester.sln
Normal file
16
ClientTester/ClientTester.sln
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EchoClientTester", "EchoClientTester\EchoClientTester.csproj", "{F093EF72-D2FA-4C17-AE64-49B6A9839EEB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F093EF72-D2FA-4C17-AE64-49B6A9839EEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F093EF72-D2FA-4C17-AE64-49B6A9839EEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F093EF72-D2FA-4C17-AE64-49B6A9839EEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F093EF72-D2FA-4C17-AE64-49B6A9839EEB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
18
ClientTester/EchoClientTester/EchoClientTester.csproj
Normal file
18
ClientTester/EchoClientTester/EchoClientTester.csproj
Normal file
@@ -0,0 +1,18 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<RootNamespace>ClientTester</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="LiteNetLib" Version="2.0.2" />
|
||||
<PackageReference Include="protobuf-net" Version="3.2.56" />
|
||||
<PackageReference Include="Serilog" Version="4.3.1" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,107 @@
|
||||
using LiteNetLib.Utils;
|
||||
using Serilog;
|
||||
|
||||
namespace ClientTester.EchoDummyService;
|
||||
|
||||
public class DummyClientService
|
||||
{
|
||||
private readonly List<DummyClients> _clients;
|
||||
private readonly int _sendInterval;
|
||||
|
||||
public DummyClientService(int count, string ip, int port, string key, int sendIntervalMs = 1000)
|
||||
{
|
||||
_sendInterval = sendIntervalMs;
|
||||
_clients = Enumerable.Range(0, count)
|
||||
.Select(i => new DummyClients(i, ip, port, key))
|
||||
.ToList();
|
||||
|
||||
Log.Information("[SERVICE] {Count}개 클라이언트 생성 → {Ip}:{Port}", count, ip, port);
|
||||
}
|
||||
|
||||
public async Task RunAsync(CancellationToken ct)
|
||||
{
|
||||
await Task.WhenAll(
|
||||
PollLoopAsync(ct),
|
||||
SendLoopAsync(ct)
|
||||
);
|
||||
}
|
||||
|
||||
private async Task PollLoopAsync(CancellationToken ct)
|
||||
{
|
||||
while (!ct.IsCancellationRequested)
|
||||
{
|
||||
foreach (var c in _clients)
|
||||
c.PollEvents();
|
||||
|
||||
try { await Task.Delay(15, ct); }
|
||||
catch (OperationCanceledException) { break; }
|
||||
}
|
||||
}
|
||||
|
||||
private async Task SendLoopAsync(CancellationToken ct)
|
||||
{
|
||||
try { await Task.Delay(500, ct); }
|
||||
catch (OperationCanceledException) { return; }
|
||||
|
||||
int tick = 0;
|
||||
|
||||
while (!ct.IsCancellationRequested)
|
||||
{
|
||||
int sent = 0;
|
||||
|
||||
foreach (var client in _clients)
|
||||
{
|
||||
client.SendPing();
|
||||
if (client.Peer != null) sent++;
|
||||
}
|
||||
|
||||
Log.Information("[TICK {Tick:000}] {Sent}/{Total} 전송", tick, sent, _clients.Count);
|
||||
tick++;
|
||||
|
||||
try { await Task.Delay(_sendInterval, ct); }
|
||||
catch (OperationCanceledException) { break; }
|
||||
}
|
||||
}
|
||||
|
||||
public void PrintStats()
|
||||
{
|
||||
int totalSent = 0, totalRecv = 0;
|
||||
int connected = 0;
|
||||
|
||||
Log.Information("════════════ Performance Report ════════════");
|
||||
|
||||
double totalAvgRtt = 0;
|
||||
|
||||
foreach (var c in _clients)
|
||||
{
|
||||
var stats = c.Peer?.Statistics;
|
||||
long loss = stats?.PacketLoss ?? 0;
|
||||
float lossPct = stats?.PacketLossPercent ?? 0f;
|
||||
|
||||
Log.Information(
|
||||
"[Client {ClientId:00}] Sent={Sent} Recv={Recv} | Loss={Loss}({LossPct:F1}%) AvgRTT={AvgRtt:F3}ms LastRTT={LastRtt:F3}ms",
|
||||
c.ClientId, c.SentCount, c.ReceivedCount, loss, lossPct, c.AvgRttMs, c.LastRttMs);
|
||||
|
||||
totalSent += c.SentCount;
|
||||
totalRecv += c.ReceivedCount;
|
||||
totalAvgRtt += c.AvgRttMs;
|
||||
if (c.Peer != null) connected++;
|
||||
}
|
||||
|
||||
double avgRtt = connected > 0 ? totalAvgRtt / connected : 0;
|
||||
|
||||
Log.Information("────────────────────────────────────────────");
|
||||
Log.Information(
|
||||
"[TOTAL] Sent={Sent} Recv={Recv} Connected={Connected}/{Total} AvgRTT={AvgRtt:F3}ms",
|
||||
totalSent, totalRecv, connected, _clients.Count, avgRtt);
|
||||
Log.Information("════════════════════════════════════════════");
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
foreach (var c in _clients)
|
||||
c.Stop();
|
||||
|
||||
Log.Information("[SERVICE] 모든 클라이언트 종료됨.");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
using System.Diagnostics;
|
||||
using LiteNetLib;
|
||||
using LiteNetLib.Utils;
|
||||
using Serilog;
|
||||
|
||||
namespace ClientTester.EchoDummyService;
|
||||
|
||||
public class DummyClients
|
||||
{
|
||||
public NetManager Manager;
|
||||
public EventBasedNetListener Listener;
|
||||
public NetPeer? Peer;
|
||||
public int ClientId;
|
||||
|
||||
// seq → 송신 타임스탬프 (Stopwatch tick)
|
||||
private readonly Dictionary<int, long> _pendingPings = new();
|
||||
private int _seqNumber;
|
||||
|
||||
// 통계
|
||||
public int SentCount;
|
||||
public int ReceivedCount;
|
||||
public double LastRttMs;
|
||||
public double TotalRttMs;
|
||||
public int RttCount;
|
||||
|
||||
public DummyClients(int clientId, string ip, int port, string key)
|
||||
{
|
||||
ClientId = clientId;
|
||||
Listener = new EventBasedNetListener();
|
||||
Manager = new NetManager(Listener);
|
||||
|
||||
Listener.PeerConnectedEvent += peer =>
|
||||
{
|
||||
Peer = peer;
|
||||
Log.Information("[Client {ClientId:00}] 연결됨", ClientId);
|
||||
};
|
||||
|
||||
Listener.NetworkReceiveEvent += (peer, reader, channel, deliveryMethod) =>
|
||||
{
|
||||
var msg = reader.GetString();
|
||||
|
||||
// "ack:seq:{seqNum}" 파싱
|
||||
var parts = msg.Split(':');
|
||||
if (parts.Length == 3 && parts[0] == "ack" && parts[1] == "seq"
|
||||
&& int.TryParse(parts[2], out int seq)
|
||||
&& _pendingPings.TryGetValue(seq, out long sentTick))
|
||||
{
|
||||
double rttMs = (Stopwatch.GetTimestamp() - sentTick)
|
||||
* 1000.0 / Stopwatch.Frequency;
|
||||
LastRttMs = rttMs;
|
||||
TotalRttMs += rttMs;
|
||||
RttCount++;
|
||||
_pendingPings.Remove(seq);
|
||||
}
|
||||
|
||||
ReceivedCount++;
|
||||
reader.Recycle();
|
||||
};
|
||||
|
||||
Listener.PeerDisconnectedEvent += (peer, info) =>
|
||||
{
|
||||
Log.Warning("[Client {ClientId:00}] 연결 끊김: {Reason}", ClientId, info.Reason);
|
||||
Peer = null;
|
||||
};
|
||||
|
||||
Manager.Start();
|
||||
Manager.Connect(ip, port, key);
|
||||
}
|
||||
|
||||
public void SendPing()
|
||||
{
|
||||
if (Peer is null) return;
|
||||
|
||||
int seq = _seqNumber++;
|
||||
_pendingPings[seq] = Stopwatch.GetTimestamp();
|
||||
|
||||
var writer = new NetDataWriter();
|
||||
writer.Put($"seq:{seq}");
|
||||
Peer.Send(writer, DeliveryMethod.ReliableOrdered);
|
||||
SentCount++;
|
||||
}
|
||||
|
||||
public double AvgRttMs => RttCount > 0 ? TotalRttMs / RttCount : 0.0;
|
||||
|
||||
public void PollEvents() => Manager.PollEvents();
|
||||
|
||||
public void Stop() => Manager.Stop();
|
||||
}
|
||||
604
ClientTester/EchoClientTester/Packet/PacketBody.cs
Normal file
604
ClientTester/EchoClientTester/Packet/PacketBody.cs
Normal file
@@ -0,0 +1,604 @@
|
||||
using ProtoBuf;
|
||||
|
||||
namespace ClientTester.Packet;
|
||||
|
||||
// ============================================================
|
||||
// 공통 타입
|
||||
// ============================================================
|
||||
|
||||
[ProtoContract]
|
||||
public class Vector3
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public float X
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public float Y
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public float Z
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
[ProtoContract]
|
||||
public class PlayerInfo
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int PlayerId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public string Nickname
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public int Level
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(4)]
|
||||
public int Hp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(5)]
|
||||
public int MaxHp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(6)]
|
||||
public int Mp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(7)]
|
||||
public int MaxMp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(8)]
|
||||
public Vector3 Position
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(9)]
|
||||
public float RotY
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
[ProtoContract]
|
||||
public class ItemInfo
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int ItemId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public int Count
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 인증
|
||||
// ============================================================
|
||||
|
||||
// RECV_TOKEN
|
||||
[ProtoContract]
|
||||
public class RecvTokenPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public string Token
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// LOAD_GAME
|
||||
[ProtoContract]
|
||||
public class LoadGamePacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public bool IsAccepted
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public PlayerInfo Player
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 로비
|
||||
// ============================================================
|
||||
|
||||
// INTO_LOBBY
|
||||
[ProtoContract]
|
||||
public class IntoLobbyPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public List<PlayerInfo> Players
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// EXIT_LOBBY
|
||||
[ProtoContract]
|
||||
public class ExitLobbyPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int PlayerId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 인스턴스 던전
|
||||
// ============================================================
|
||||
|
||||
public enum BossState
|
||||
{
|
||||
START,
|
||||
END,
|
||||
PHASE_CHANGE
|
||||
}
|
||||
|
||||
public enum BossResult
|
||||
{
|
||||
SUCCESS,
|
||||
FAIL
|
||||
}
|
||||
|
||||
// INTO_INSTANCE
|
||||
[ProtoContract]
|
||||
public class IntoInstancePacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int InstanceId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public int BossId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public List<int> PlayerIds
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// UPDATE_BOSS
|
||||
[ProtoContract]
|
||||
public class UpdateBossPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public BossState State
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public int Phase
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public BossResult Result
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} // END일 때만 유효
|
||||
}
|
||||
|
||||
// REWARD_INSTANCE
|
||||
[ProtoContract]
|
||||
public class RewardInstancePacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int Exp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public List<ItemInfo> Items
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// EXIT_INSTANCE
|
||||
[ProtoContract]
|
||||
public class ExitInstancePacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int PlayerId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 파티
|
||||
// ============================================================
|
||||
|
||||
public enum PartyUpdateType
|
||||
{
|
||||
CREATE,
|
||||
DELETE
|
||||
}
|
||||
|
||||
public enum UserPartyUpdateType
|
||||
{
|
||||
JOIN,
|
||||
LEAVE
|
||||
}
|
||||
|
||||
// UPDATE_PARTY
|
||||
[ProtoContract]
|
||||
public class UpdatePartyPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int PartyId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public PartyUpdateType Type
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public int LeaderId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// UPDATE_USER_PARTY
|
||||
[ProtoContract]
|
||||
public class UpdateUserPartyPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int PartyId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public int PlayerId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public UserPartyUpdateType Type
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 플레이어
|
||||
// ============================================================
|
||||
|
||||
public enum PlayerActionType
|
||||
{
|
||||
IDLE,
|
||||
MOVE,
|
||||
ATTACK,
|
||||
SKILL,
|
||||
DODGE,
|
||||
DIE,
|
||||
REVIVE
|
||||
}
|
||||
|
||||
// TRANSFORM_PLAYER
|
||||
[ProtoContract]
|
||||
public class TransformPlayerPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int PlayerId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public Vector3 Position
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public float RotY
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// ACTION_PLAYER
|
||||
[ProtoContract]
|
||||
public class ActionPlayerPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int PlayerId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public PlayerActionType Action
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public int SkillId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} // ATTACK, SKILL일 때
|
||||
|
||||
[ProtoMember(4)]
|
||||
public int TargetId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} // 공격 대상
|
||||
}
|
||||
|
||||
// STATE_PLAYER
|
||||
[ProtoContract]
|
||||
public class StatePlayerPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int PlayerId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public int Hp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public int MaxHp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(4)]
|
||||
public int Mp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(5)]
|
||||
public int MaxMp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// NPC
|
||||
// ============================================================
|
||||
|
||||
public enum NpcActionType
|
||||
{
|
||||
IDLE,
|
||||
MOVE,
|
||||
ATTACK,
|
||||
SKILL,
|
||||
DIE
|
||||
}
|
||||
|
||||
// TRANSFORM_NPC
|
||||
[ProtoContract]
|
||||
public class TransformNpcPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int NpcId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public Vector3 Position
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public float RotY
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// ACTION_NPC
|
||||
[ProtoContract]
|
||||
public class ActionNpcPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int NpcId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public NpcActionType Action
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public int PatternId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} // 사용 패턴/스킬 번호
|
||||
|
||||
[ProtoMember(4)]
|
||||
public int TargetId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// STATE_NPC
|
||||
[ProtoContract]
|
||||
public class StateNpcPacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int NpcId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public int Hp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public int MaxHp
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(4)]
|
||||
public int Phase
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 데미지
|
||||
// ============================================================
|
||||
|
||||
// DAMAGE
|
||||
[ProtoContract]
|
||||
public class DamagePacket
|
||||
{
|
||||
[ProtoMember(1)]
|
||||
public int AttackerId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(2)]
|
||||
public int TargetId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(3)]
|
||||
public int Amount
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[ProtoMember(4)]
|
||||
public bool IsCritical
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
61
ClientTester/EchoClientTester/Packet/PacketHeader.cs
Normal file
61
ClientTester/EchoClientTester/Packet/PacketHeader.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
namespace ClientTester.Packet;
|
||||
|
||||
public enum PacketCode
|
||||
{
|
||||
NONE,
|
||||
// 초기 클라이언트 시작시 jwt토큰 받아옴
|
||||
RECV_TOKEN,
|
||||
// jwt토큰 검증후 게임에 들어갈지 말지 (내 데이터도 전송)
|
||||
LOAD_GAME,
|
||||
|
||||
// 마을(로비)진입시 모든 데이터 로드
|
||||
INTO_LOBBY,
|
||||
|
||||
// 로비 나가기
|
||||
EXIT_LOBBY,
|
||||
|
||||
// 인스턴스 던전 입장
|
||||
INTO_INSTANCE,
|
||||
|
||||
// 결과 보상
|
||||
REWARD_INSTANCE,
|
||||
|
||||
// 보스전 (시작, 종료)
|
||||
UPDATE_BOSS,
|
||||
|
||||
// 인스턴스 던전 퇴장
|
||||
EXIT_INSTANCE,
|
||||
|
||||
// 파티 (생성, 삭제)
|
||||
UPDATE_PARTY,
|
||||
|
||||
// 파티 유저 업데이트(추가 삭제)
|
||||
UPDATE_USER_PARTY,
|
||||
|
||||
// 플레이어 위치, 방향
|
||||
TRANSFORM_PLAYER,
|
||||
|
||||
// 플레이어 행동 업데이트
|
||||
ACTION_PLAYER,
|
||||
|
||||
// 플레이어 스테이트 업데이트
|
||||
STATE_PLAYER,
|
||||
|
||||
// NPC 위치, 방향
|
||||
TRANSFORM_NPC,
|
||||
|
||||
// NPC 행동 업데이트
|
||||
ACTION_NPC,
|
||||
|
||||
// NPC 스테이트 업데이트
|
||||
STATE_NPC,
|
||||
|
||||
// 데미지 UI 전달
|
||||
DAMAGE
|
||||
}
|
||||
|
||||
public class PacketHeader
|
||||
{
|
||||
public PacketCode Code;
|
||||
public int BodyLength;
|
||||
}
|
||||
28
ClientTester/EchoClientTester/Program.cs
Normal file
28
ClientTester/EchoClientTester/Program.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
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();
|
||||
48
ClientTester/TempServer/Program.cs
Normal file
48
ClientTester/TempServer/Program.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using LiteNetLib;
|
||||
using LiteNetLib.Utils;
|
||||
|
||||
const int PORT = 9500;
|
||||
const string CONNECTION_KEY = "game";
|
||||
|
||||
var listener = new EventBasedNetListener();
|
||||
var server = new NetManager(listener);
|
||||
|
||||
listener.ConnectionRequestEvent += request =>
|
||||
{
|
||||
request.AcceptIfKey(CONNECTION_KEY);
|
||||
};
|
||||
|
||||
listener.PeerConnectedEvent += peer =>
|
||||
{
|
||||
Console.WriteLine($"[CONNECT] {peer.Port} (ID:{peer.Id}, Total:{server.ConnectedPeersCount})");
|
||||
};
|
||||
|
||||
listener.PeerDisconnectedEvent += (peer, info) =>
|
||||
{
|
||||
Console.WriteLine($"[DISCONNECT] {peer.Port} Reason:{info.Reason} (Remaining:{server.ConnectedPeersCount})");
|
||||
};
|
||||
|
||||
listener.NetworkReceiveEvent += (fromPeer, reader, channel, deliveryMethod) =>
|
||||
{
|
||||
var msg = reader.GetString();
|
||||
Console.WriteLine($"[RECV] ID:{fromPeer.Id} → {msg}");
|
||||
|
||||
// 클라이언트 ReceivedCount 증가시키려면 응답 필요
|
||||
var writer = new NetDataWriter();
|
||||
writer.Put($"ack:{msg}");
|
||||
fromPeer.Send(writer, deliveryMethod);
|
||||
|
||||
reader.Recycle();
|
||||
};
|
||||
|
||||
server.Start(PORT);
|
||||
Console.WriteLine($"[SERVER] Started on port {PORT}. Press Enter to stop.");
|
||||
|
||||
while (!Console.KeyAvailable)
|
||||
{
|
||||
server.PollEvents();
|
||||
Thread.Sleep(15);
|
||||
}
|
||||
|
||||
server.Stop();
|
||||
Console.WriteLine("[SERVER] Stopped.");
|
||||
14
ClientTester/TempServer/TempServer.csproj
Normal file
14
ClientTester/TempServer/TempServer.csproj
Normal file
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="LiteNetLib" Version="2.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user