React to Hosting changes
This commit is contained in:
parent
cb9f44ddf6
commit
47ac4e5bf9
|
|
@ -1,6 +1,8 @@
|
|||
// Copyright (c) .NET Foundation. All rights reserved.
|
||||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace Microsoft.AspNetCore.Sockets
|
||||
|
|
@ -14,14 +16,16 @@ namespace Microsoft.AspNetCore.Sockets
|
|||
_connectionManager = connectionManager;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
public Task StartAsync(CancellationToken token)
|
||||
{
|
||||
_connectionManager.Start();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
public Task StopAsync(CancellationToken token)
|
||||
{
|
||||
_connectionManager.CloseConnections();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue