feat : 보스 레이드 입장 메시지 기능 추가
This commit is contained in:
@@ -16,25 +16,29 @@ public class Session
|
||||
init;
|
||||
}
|
||||
|
||||
public string UserName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public NetPeer Peer
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
// ─── 패킷 레이트 리미팅 ───────────────────────────
|
||||
// 패킷 레이트 리미팅
|
||||
private int packetCount;
|
||||
private long windowStartTicks;
|
||||
|
||||
/// <summary>초당 허용 패킷 수</summary>
|
||||
// 초당 허용 패킷 수
|
||||
public int MaxPacketsPerSecond { get; set; }
|
||||
|
||||
/// <summary>연속 초과 횟수</summary>
|
||||
// 연속 초과 횟수
|
||||
public int RateLimitViolations { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 패킷 수신 시 호출. 초당 제한 초과 시 true 반환.
|
||||
/// </summary>
|
||||
// 패킷 수신 시 호출. 초당 제한 초과 시 true 반환.
|
||||
public bool CheckRateLimit()
|
||||
{
|
||||
long now = Environment.TickCount64;
|
||||
@@ -57,7 +61,7 @@ public class Session
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>위반 카운트 초기화</summary>
|
||||
// 위반 카운트 초기화
|
||||
public void ResetViolations()
|
||||
{
|
||||
RateLimitViolations = 0;
|
||||
|
||||
Reference in New Issue
Block a user