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