fix:1、修改命名空间和文件夹名字

This commit is contained in:
2026-04-27 11:20:13 +08:00
parent db90a6e485
commit 70d45d4705
4252 changed files with 465 additions and 463 deletions
@@ -0,0 +1,53 @@
#if DEBUG && !UNITY_WP_8_1 && !UNITY_WSA
using System.Collections.Generic;
namespace FlyingWormConsole3.LiteNetLib
{
internal sealed class SequencedChannel
{
private ushort _localSequence;
private ushort _remoteSequence;
private readonly Queue<NetPacket> _outgoingPackets;
private readonly NetPeer _peer;
public SequencedChannel(NetPeer peer)
{
_outgoingPackets = new Queue<NetPacket>();
_peer = peer;
}
public void AddToQueue(NetPacket packet)
{
lock (_outgoingPackets)
{
_outgoingPackets.Enqueue(packet);
}
}
public bool SendNextPacket()
{
NetPacket packet;
lock (_outgoingPackets)
{
if (_outgoingPackets.Count == 0)
return false;
packet = _outgoingPackets.Dequeue();
}
_localSequence++;
packet.Sequence = _localSequence;
_peer.SendRawData(packet);
_peer.Recycle(packet);
return true;
}
public void ProcessPacket(NetPacket packet)
{
if (NetUtils.RelativeSequenceNumber(packet.Sequence, _remoteSequence) > 0)
{
_remoteSequence = packet.Sequence;
_peer.AddIncomingPacket(packet);
}
}
}
}
#endif