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
major update; gen 3.5
This commit is contained in:
@@ -20,27 +20,35 @@ using System;
|
||||
|
||||
namespace Lidgren.Network
|
||||
{
|
||||
/// <summary>
|
||||
/// All the constants used when compiling the library
|
||||
/// </summary>
|
||||
public static class NetConstants
|
||||
{
|
||||
public const int NumTotalChannels = 99;
|
||||
|
||||
public const int NetChannelsPerDeliveryMethod = 32;
|
||||
|
||||
public const int NumSequenceNumbers = ushort.MaxValue + 1; // 0 is a valid sequence number
|
||||
public const int NumSequenceNumbers = 1024;
|
||||
|
||||
public const int HeaderByteSize = 5;
|
||||
|
||||
public const int UnreliableWindowSize = 128;
|
||||
public const int ReliableOrderedWindowSize = 64;
|
||||
public const int ReliableSequencedWindowSize = 64;
|
||||
|
||||
public const int MaxFragmentationGroups = ushort.MaxValue - 1;
|
||||
|
||||
/// <summary>
|
||||
/// Number of channels which needs a sequence number to work
|
||||
/// </summary>
|
||||
internal const int NumSequencedChannels = ((int)NetMessageType.UserReliableOrdered + NetConstants.NetChannelsPerDeliveryMethod) - (int)NetMessageType.UserSequenced;
|
||||
internal const int NumSequencedChannels = ((int)NetMessageType.UserReliableOrdered1 + NetConstants.NetChannelsPerDeliveryMethod) - (int)NetMessageType.UserSequenced1;
|
||||
|
||||
/// <summary>
|
||||
/// Number of reliable channels
|
||||
/// </summary>
|
||||
internal const int NumReliableChannels = ((int)NetMessageType.UserReliableOrdered + NetConstants.NetChannelsPerDeliveryMethod) - (int)NetMessageType.UserReliableUnordered;
|
||||
|
||||
/// <summary>
|
||||
/// Number of bytes added when message is really a fragment
|
||||
/// </summary>
|
||||
internal const int FragmentHeaderSize = 6;
|
||||
|
||||
internal const int NumReliableChannels = ((int)NetMessageType.UserReliableOrdered1 + NetConstants.NetChannelsPerDeliveryMethod) - (int)NetMessageType.UserReliableUnordered;
|
||||
|
||||
internal const string ConnResetMessage = "Connection was reset by remote host";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user