namespace NahidaImpact.Kcp
{
///
/// Options for sending receive window size notification.
///
public sealed class KcpReceiveWindowNotificationOptions
{
///
/// Create an instance of option object for receive window size notification functionality.
///
/// The initial interval in milliseconds of sending window size notification.
/// The maximum interval in milliseconds of sending window size notification.
public KcpReceiveWindowNotificationOptions(int initialInterval, int maximumInterval)
{
if (initialInterval <= 0)
{
throw new ArgumentOutOfRangeException(nameof(initialInterval));
}
if (maximumInterval < initialInterval)
{
throw new ArgumentOutOfRangeException(nameof(maximumInterval));
}
InitialInterval = initialInterval;
MaximumInterval = maximumInterval;
}
///
/// The initial interval in milliseconds of sending window size notification.
///
public int InitialInterval { get; }
///
/// The maximum interval in milliseconds of sending window size notification.
///
public int MaximumInterval { get; }
}
}