WutheringWaves/GameServer/WWGameServer.cs
2024-02-08 00:41:39 +03:00

27 lines
629 B
C#

using GameServer.Handlers.Factory;
using GameServer.Network;
using Microsoft.Extensions.Hosting;
namespace GameServer;
internal class WWGameServer : IHostedService
{
private readonly KcpGateway _gateway;
public WWGameServer(KcpGateway gateway, MessageHandlerFactory messageHandlerFactory)
{
_ = messageHandlerFactory;
_gateway = gateway;
}
public Task StartAsync(CancellationToken cancellationToken)
{
_gateway.Start();
return Task.CompletedTask;
}
public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}