Lidgren.Network.NetIncomingMessage.PeekBytes C# (CSharp) Méthode

PeekBytes() public méthode

Reads the specified number of bytes without advancing the read pointer
public PeekBytes ( int numberOfBytes ) : byte[]
numberOfBytes int
Résultat byte[]
        public byte[] PeekBytes(int numberOfBytes)
        {
            NetException.Assert(m_bitLength - m_readPosition >= (numberOfBytes * 8), c_readOverflowError);

            byte[] retval = new byte[numberOfBytes];
            NetBitWriter.ReadBytes(m_data, numberOfBytes, m_readPosition, retval, 0);
            return retval;
        }

Same methods

NetIncomingMessage::PeekBytes ( byte into, int offset, int numberOfBytes ) : void