feat : 나중 구조적 통합을 위해 main쪽 비동기 로직으로 변경
This commit is contained in:
@@ -61,7 +61,7 @@ public abstract class ServerBase : INetEventListener
|
||||
isListening = true;
|
||||
}
|
||||
|
||||
public virtual void Run()
|
||||
public async Task Run()
|
||||
{
|
||||
netManager.Start(Port);
|
||||
Log.Information("[Server] 시작 Port={Port}", Port);
|
||||
@@ -69,7 +69,7 @@ public abstract class ServerBase : INetEventListener
|
||||
while (isListening)
|
||||
{
|
||||
netManager.PollEvents();
|
||||
Thread.Sleep(15);
|
||||
await Task.Delay(1);
|
||||
}
|
||||
netManager.Stop();
|
||||
Log.Information("[Server] 종료 Port={Port}", Port);
|
||||
@@ -193,7 +193,8 @@ public abstract class ServerBase : INetEventListener
|
||||
short code = reader.GetShort();
|
||||
short bodyLength = reader.GetShort();
|
||||
Log.Debug("[Echo] : addr={Addr}, str={Str}", peer.Address, reader.GetString());
|
||||
SendTo(peer, payload);
|
||||
// Echo메시지는 순서보장 안함 HOL Blocking 제거
|
||||
SendTo(peer, payload, DeliveryMethod.ReliableUnordered);
|
||||
}
|
||||
|
||||
// ─── Auth 처리 (내부) ────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user