diff --git a/Lidgren.Network/NetIncomingMessage.Read.cs b/Lidgren.Network/NetIncomingMessage.Read.cs index d652dd0..e16338f 100644 --- a/Lidgren.Network/NetIncomingMessage.Read.cs +++ b/Lidgren.Network/NetIncomingMessage.Read.cs @@ -41,6 +41,14 @@ namespace Lidgren.Network set { m_readPosition = (int)value; } } + /// + /// Gets the position in the buffer in bytes; note that the bits of the first returned byte may already have been read - check the Position property to make sure. + /// + public int PositionInBytes + { + get { return (int)(m_readPosition / 8); } + } + static NetIncomingMessage() { Type[] integralTypes = typeof(Byte).Assembly.GetTypes();