25 lines
689 B
C#
25 lines
689 B
C#
using RPG.Services.Core;
|
|
using RPG.Services.Gateserver.Network.Tcp;
|
|
|
|
namespace RPG.Services.Gateserver;
|
|
internal class RPGGateserver : RPGServiceBase
|
|
{
|
|
private readonly TcpGateway _gateway;
|
|
|
|
public RPGGateserver(ServiceManager serviceManager, TcpGateway tcpGateway) : base(serviceManager)
|
|
{
|
|
_gateway = tcpGateway;
|
|
}
|
|
|
|
public override async Task StartAsync(CancellationToken cancellationToken)
|
|
{
|
|
await base.StartAsync(cancellationToken);
|
|
_gateway.Start();
|
|
}
|
|
|
|
public override async Task StopAsync(CancellationToken cancellationToken)
|
|
{
|
|
await base.StopAsync(cancellationToken);
|
|
await _gateway.StopAsync();
|
|
}
|
|
}
|