IW4M-Admin/Integrations/Cod/ConnectionState.cs

25 lines
681 B
C#
Raw Permalink Normal View History

using System;
using System.Collections.Generic;
using System.Threading;
2021-06-03 11:51:03 -04:00
namespace Integrations.Cod
{
/// <summary>
/// used to keep track of the udp connection state
/// </summary>
internal class ConnectionState
{
~ConnectionState()
{
OnComplete.Dispose();
}
public int ConnectionAttempts { get; set; }
private const int BufferSize = 16384;
public readonly byte[] ReceiveBuffer = new byte[BufferSize];
2022-04-25 16:39:30 -04:00
public readonly SemaphoreSlim OnComplete = new(1, 1);
public List<byte[]> ReceivedBytes { get; } = new();
public DateTime LastQuery { get; set; } = DateTime.Now;
}
2022-02-02 17:21:08 -05:00
}