using Microsoft.Extensions.Hosting; using Yuanshen.Gameserver.Network; namespace Yuanshen.Gameserver; internal sealed class GameServer(IGateway gateway) : IHostedService { public Task StartAsync(CancellationToken cancellationToken) => gateway.Start(); public Task StopAsync(CancellationToken cancellationToken) => gateway.Stop(); }