namespace KcpSharp
{
///
/// Options used to control the behaviors of .
///
public class KcpConversationOptions
{
///
/// The buffer pool to rent buffer from.
///
public IKcpBufferPool? BufferPool { get; set; }
///
/// The maximum packet size that can be transmitted over the underlying transport.
///
public int Mtu { get; set; } = 1400;
///
/// The number of packets in the send window.
///
public int SendWindow { get; set; } = 32;
///
/// The number of packets in the receive window.
///
public int ReceiveWindow { get; set; } = 128;
///
/// The nuber of packets in the receive window of the remote host.
///
public int RemoteReceiveWindow { get; set; } = 128;
///
/// The interval in milliseconds to update the internal state of .
///
public int UpdateInterval { get; set; } = 100;
///
/// Wether no-delay mode is enabled.
///
public bool NoDelay { get; set; }
///
/// The number of ACK packet skipped before a resend is triggered.
///
public int FastResend { get; set; }
///
/// Whether congestion control is disabled.
///
public bool DisableCongestionControl { get; set; }
///
/// Whether stream mode is enabled.
///
public bool StreamMode { get; set; }
///
/// The number of packets in the send queue.
///
public int SendQueueSize { get; set; }
///
/// The number of packets in the receive queue.
///
public int ReceiveQueueSize { get; set; }
///
/// The number of bytes to reserve at the start of buffer passed into the underlying transport. The transport should fill this reserved space.
///
public int PreBufferSize { get; set; }
///
/// The number of bytes to reserve at the end of buffer passed into the underlying transport. The transport should fill this reserved space.
///
public int PostBufferSize { get; set; }
///
/// Options for customized keep-alive functionality.
///
public KcpKeepAliveOptions? KeepAliveOptions { get; set; }
///
/// Options for receive window size notification functionality.
///
public KcpReceiveWindowNotificationOptions? ReceiveWindowNotificationOptions { get; set; }
internal const int MtuDefaultValue = 1400;
internal const uint SendWindowDefaultValue = 32;
internal const uint ReceiveWindowDefaultValue = 128;
internal const uint RemoteReceiveWindowDefaultValue = 128;
internal const uint UpdateIntervalDefaultValue = 100;
internal const int SendQueueSizeDefaultValue = 32;
internal const int ReceiveQueueSizeDefaultValue = 32;
}
}