Closed nikeee closed 3 years ago
Looks like I was wrong, Timers were introduced in .NET Standard 2.0.
I'll take a look at implementing it internally, I agree it should mostly be transparent, but there should be ways to disable it in case the user already has their own solution in place.
I have implemented this as a simple task:
private async Task KeepAlive(CancellationToken cancellationToken, TimeSpan delay)
{
while (!cancellationToken.IsCancellationRequested)
{
await TeamSpeak.WhoAmI();
await Task.Delay(delay, cancellationToken);
}
}
Solved via #67
See #64 for the need of this.
Option 1:
Use
System.Timers.Timer
Pros:Note:
Option 2:
Timeout in the response queue. Pros:
Option N
[your suggestion here (comment on this issue)]
General implementation notes: