You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-16 07:06:30 +09:00
Added configuration setting to suppress acks for unreliable unordered messages
This commit is contained in:
@@ -58,6 +58,7 @@ namespace Lidgren.Network
|
||||
internal bool m_enableUPnP;
|
||||
internal bool m_autoFlushSendQueue;
|
||||
private NetUnreliableSizeBehaviour m_unreliableSizeBehaviour;
|
||||
internal bool m_suppressUnreliableUnorderedAcks;
|
||||
|
||||
internal NetIncomingMessageType m_disabledTypes;
|
||||
internal int m_port;
|
||||
@@ -112,6 +113,7 @@ namespace Lidgren.Network
|
||||
m_resendHandshakeInterval = 3.0f;
|
||||
m_maximumHandshakeAttempts = 5;
|
||||
m_autoFlushSendQueue = true;
|
||||
m_suppressUnreliableUnorderedAcks = true;
|
||||
|
||||
m_maximumTransmissionUnit = kDefaultMTU;
|
||||
m_autoExpandMTU = false;
|
||||
@@ -311,6 +313,20 @@ namespace Lidgren.Network
|
||||
set { m_autoFlushSendQueue = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If true, will not send acks for unreliable unordered messages. This will save bandwidth, but disable flow control and duplicate detection for this type of messages.
|
||||
/// </summary>
|
||||
public bool SuppressUnreliableUnorderedAcks
|
||||
{
|
||||
get { return m_suppressUnreliableUnorderedAcks; }
|
||||
set
|
||||
{
|
||||
if (m_isLocked)
|
||||
throw new NetException(c_isLockedMessage);
|
||||
m_suppressUnreliableUnorderedAcks = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the local ip address to bind to. Defaults to IPAddress.Any. Cannot be changed once NetPeer is initialized.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user