1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 22:56:30 +09:00

NetConnection.Status added - reflects the "message consumed" status for consistency. Encryption work in progress.

This commit is contained in:
lidgren
2010-05-08 20:02:13 +00:00
parent 9099ff30c5
commit 25af67f958
7 changed files with 132 additions and 10 deletions

View File

@@ -143,7 +143,16 @@ namespace Lidgren.Network
if (m_status == NetPeerStatus.NotRunning)
return null;
return m_releasedIncomingMessages.TryDequeue();
NetIncomingMessage retval = m_releasedIncomingMessages.TryDequeue();
if (retval != null)
{
if (retval.MessageType == NetIncomingMessageType.StatusChanged)
{
NetConnectionStatus status = (NetConnectionStatus)retval.PeekByte();
retval.SenderConnection.Status = status;
}
}
return retval;
}
public NetIncomingMessage WaitMessage(int maxMillis)