1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-17 07:36:32 +09:00

Sequence numbers now stored in dictionary per connection to enable sending the same message reliable ordered message to several connections

This commit is contained in:
lidgren
2010-05-20 18:36:19 +00:00
parent 00edeaabf4
commit 046ca06ec6
11 changed files with 84 additions and 79 deletions

View File

@@ -229,7 +229,7 @@ namespace Lidgren.Network
// TODO: use throttling here
//
int ptr = um.Encode(m_sendBuffer, 0, null);
int ptr = um.Encode(now, m_sendBuffer, 0, null);
if (recipient.Address.Equals(IPAddress.Broadcast))
{
@@ -577,12 +577,12 @@ namespace Lidgren.Network
return NetDeliveryMethod.Unreliable;
}
internal void SendImmediately(NetConnection conn, NetOutgoingMessage msg)
internal void SendImmediately(double now, NetConnection conn, NetOutgoingMessage msg)
{
NetException.Assert(msg.m_type == NetMessageType.Library, "SendImmediately can only send library (non-reliable) messages");
msg.m_inQueueCount = 1;
int len = msg.Encode(m_sendBuffer, 0, conn);
int len = msg.Encode(now, m_sendBuffer, 0, conn);
Interlocked.Decrement(ref msg.m_inQueueCount);
SendPacket(len, conn.m_remoteEndpoint, 1);