feat : 파일 네이밍 변경, 변수 라인 변경

This commit is contained in:
qornwh1
2026-03-03 15:08:13 +09:00
parent e3f365877b
commit a9e1d2acaf
2 changed files with 20 additions and 7 deletions

View File

@@ -36,11 +36,25 @@ public abstract class ServerBase : INetEventListener
// peer → hashKey 역방향은 peer.Tag as Session 으로 대체
private readonly Dictionary<long, NetPeer> sessions = new();
// 핑 로그 출력 여부
public bool PingLogRtt { get; set; }
// 재사용 NetDataWriter (단일 스레드 폴링이므로 안전)
private readonly NetDataWriter cachedWriter = new();
public int Port { get; }
public string ConnectionString { get; }
// 핑 로그 출력 여부
public bool PingLogRtt
{
get;
set;
}
public int Port
{
get;
}
public string ConnectionString
{
get;
}
private volatile bool isListening = false;
@@ -71,6 +85,7 @@ public abstract class ServerBase : INetEventListener
netManager.PollEvents();
await Task.Delay(1);
}
netManager.Stop();
Log.Information("[Server] 종료 Port={Port}", Port);
}
@@ -112,6 +127,7 @@ public abstract class ServerBase : INetEventListener
Log.Information("[Server] 세션 해제 HashKey={Key} Reason={Reason}", session.HashKey, disconnectInfo.Reason);
OnSessionDisconnected(peer, session.HashKey, disconnectInfo);
}
peer.Tag = null;
}
}
@@ -235,9 +251,6 @@ public abstract class ServerBase : INetEventListener
// ─── 전송 헬퍼 ───────────────────────────────────────────────────────
// 재사용 NetDataWriter (단일 스레드 폴링이므로 안전)
private readonly NetDataWriter cachedWriter = new();
// peer에게 전송
protected void SendTo(NetPeer peer, byte[] data, DeliveryMethod method = DeliveryMethod.ReliableOrdered)
{