WutheringWaves/GameServer/WWGameServer.cs

25 lines
610 B
C#
Raw Normal View History

2024-02-09 22:15:05 +00:00
using GameServer.Controllers.Factory;
2024-02-09 09:44:42 +00:00
using GameServer.Network.Kcp;
2024-02-07 21:41:39 +00:00
using Microsoft.Extensions.Hosting;
namespace GameServer;
internal class WWGameServer : IHostedService
{
private readonly KcpGateway _gateway;
2024-02-09 22:15:05 +00:00
public WWGameServer(KcpGateway gateway, EventHandlerFactory messageHandlerFactory)
2024-02-07 21:41:39 +00:00
{
_ = messageHandlerFactory;
_gateway = gateway;
}
public Task StartAsync(CancellationToken cancellationToken)
{
_gateway.Start();
return Task.CompletedTask;
}
2024-02-09 22:15:05 +00:00
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
2024-02-07 21:41:39 +00:00
}