You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-15 06:36:30 +09:00
Handshakes are now resent if lost. Documentation updated.
This commit is contained in:
@@ -44,6 +44,8 @@ namespace Lidgren.Network
|
||||
internal int m_port;
|
||||
internal int m_receiveBufferSize;
|
||||
internal int m_sendBufferSize;
|
||||
internal float m_resendHandshakeInterval;
|
||||
internal int m_maximumHandshakeAttempts;
|
||||
|
||||
// bad network simulation
|
||||
internal float m_loss;
|
||||
@@ -79,6 +81,8 @@ namespace Lidgren.Network
|
||||
m_pingInterval = 4.0f;
|
||||
m_connectionTimeout = 25.0f;
|
||||
m_useMessageRecycling = true;
|
||||
m_resendHandshakeInterval = 3.0f;
|
||||
m_maximumHandshakeAttempts = 5;
|
||||
|
||||
// Maximum transmission unit
|
||||
// Ethernet can take 1500 bytes of payload, so lets stay below that.
|
||||
@@ -302,6 +306,24 @@ namespace Lidgren.Network
|
||||
set { m_acceptIncomingConnections = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of seconds between handshake attempts
|
||||
/// </summary>
|
||||
public float ResendHandshakeInterval
|
||||
{
|
||||
get { return m_resendHandshakeInterval; }
|
||||
set { m_resendHandshakeInterval = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum number of handshake attempts before failing to connect
|
||||
/// </summary>
|
||||
public int MaximumHandshakeAttempts
|
||||
{
|
||||
get { return m_maximumHandshakeAttempts; }
|
||||
set { m_maximumHandshakeAttempts = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets if the NetPeer should send large messages to try to expand the maximum transmission unit size
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user