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

NetIncomingMessage and NetOutgoingMessage common parts unified in NetBuffer; which is now a base class for the former

This commit is contained in:
lidgren
2012-03-23 08:59:32 +00:00
parent 8cbdd6e317
commit 0a0e319f21
25 changed files with 2165 additions and 286 deletions

View File

@@ -26,10 +26,8 @@ namespace Lidgren.Network
/// Incoming message either sent from a remote peer or generated within the library
/// </summary>
[DebuggerDisplay("Type={MessageType} LengthBits={LengthBits}")]
public partial class NetIncomingMessage
public sealed class NetIncomingMessage : NetBuffer
{
internal byte[] m_data;
internal int m_bitLength;
internal NetIncomingMessageType m_incomingMessageType;
internal IPEndPoint m_senderEndpoint;
internal NetConnection m_senderConnection;
@@ -68,23 +66,6 @@ namespace Lidgren.Network
/// </summary>
public double ReceiveTime { get { return m_receiveTime; } }
/// <summary>
/// Gets the length of the message payload in bytes
/// </summary>
public int LengthBytes
{
get { return ((m_bitLength + 7) >> 3); }
}
/// <summary>
/// Gets the length of the message payload in bits
/// </summary>
public int LengthBits
{
get { return m_bitLength; }
internal set { m_bitLength = value; }
}
internal NetIncomingMessage()
{
}