feat : 코드 주석 정리
This commit is contained in:
@@ -176,11 +176,15 @@ public abstract class ServerBase : INetEventListener
|
||||
_ = HandleAuth(peer, payload).ContinueWith(t =>
|
||||
{
|
||||
if (t.IsFaulted)
|
||||
{
|
||||
Log.Error(t.Exception, "[Server] HandleAuth 예외 PeerId={Id}", peer.Id);
|
||||
}
|
||||
}, TaskContinuationOptions.OnlyOnFaulted);
|
||||
return;
|
||||
}
|
||||
else if (type == (ushort)PacketType.DUMMY_ACC_TOKEN)
|
||||
|
||||
// Auth 이외 패킷 처리
|
||||
if (type == (ushort)PacketType.DUMMY_ACC_TOKEN)
|
||||
{
|
||||
HandleAuthDummy(peer, payload);
|
||||
return;
|
||||
@@ -205,9 +209,9 @@ public abstract class ServerBase : INetEventListener
|
||||
return;
|
||||
}
|
||||
|
||||
Log.Warning("[Server] 레이트 리밋 초과 ({Count}회) HashKey={Key} PeerId={Id}", session.RateLimitViolations, session.HashKey,
|
||||
peer.Id);
|
||||
return; // 패킷 드롭
|
||||
// 패킷 드롭
|
||||
Log.Warning("[Server] 레이트 리밋 초과 ({Count}회) HashKey={Key} PeerId={Id}", session.RateLimitViolations, session.HashKey, peer.Id);
|
||||
return;
|
||||
}
|
||||
|
||||
HandlePacket(peer, session.HashKey, type, payload);
|
||||
@@ -237,23 +241,19 @@ public abstract class ServerBase : INetEventListener
|
||||
if (PingLogRtt)
|
||||
{
|
||||
// rtt 시간 출력
|
||||
// Log.Debug("[Server] latency : {Latency} ", latency);
|
||||
}
|
||||
}
|
||||
|
||||
// Echo 서버 테스트
|
||||
|
||||
protected abstract void HandleEcho(NetPeer peer, byte[] payload);
|
||||
|
||||
// ─── Auth 처리 (더미) ────────────────────────────────────────────────
|
||||
|
||||
// Auth 처리 (더미)
|
||||
protected abstract void HandleAuthDummy(NetPeer peer, byte[] payload);
|
||||
|
||||
// ─── Auth 처리 ────────────────────────────────────────────────
|
||||
|
||||
// Auth 처리
|
||||
protected abstract Task HandleAuth(NetPeer peer, byte[] payload);
|
||||
|
||||
// ─── 전송 헬퍼 ───────────────────────────────────────────────────────
|
||||
|
||||
// peer에게 전송
|
||||
protected void SendTo(NetPeer peer, byte[] data, DeliveryMethod method = DeliveryMethod.ReliableOrdered)
|
||||
{
|
||||
@@ -278,8 +278,6 @@ public abstract class ServerBase : INetEventListener
|
||||
netManager.SendToAll(cachedWriter, 0, method, exclude);
|
||||
}
|
||||
|
||||
// ─── 서브클래스 구현 ─────────────────────────────────────────────────
|
||||
|
||||
// 인증(Auth) 완료 후 호출
|
||||
protected abstract void OnSessionConnected(NetPeer peer, int hashKey);
|
||||
|
||||
|
||||
@@ -36,8 +36,6 @@ public static class CrashDumpHandler
|
||||
Log.Information("[CrashDump] 핸들러 등록 완료 (CrashDir={Dir})", Path.GetFullPath(CRASH_DIR));
|
||||
}
|
||||
|
||||
// ─── 핸들러 ──────────────────────────────────────────────────────────
|
||||
|
||||
private static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
Exception? ex = e.ExceptionObject as Exception;
|
||||
@@ -52,8 +50,6 @@ public static class CrashDumpHandler
|
||||
WriteCrash(tag, e.Exception);
|
||||
}
|
||||
|
||||
// ─── 핵심 처리 ───────────────────────────────────────────────────────
|
||||
|
||||
private static void WriteCrash(string tag, Exception? ex)
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user