本文整理匯總了C#中RakNet.BitStream.PrintBits方法的典型用法代碼示例。如果您正苦於以下問題:C# BitStream.PrintBits方法的具體用法?C# BitStream.PrintBits怎麽用?C# BitStream.PrintBits使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類RakNet.BitStream
的用法示例。
在下文中一共展示了BitStream.PrintBits方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: Main
//.........這裏部分代碼省略.........
if (bitStreamTestPacket != null)
{
testServer.DeallocatePacket(bitStreamTestPacket);
}
bitStreamTestPacket = testServer.Receive();
testClient.Send(testBitStream1, PacketPriority.HIGH_PRIORITY, PacketReliability.RELIABLE_ORDERED, (char)0, new AddressOrGUID(RakNet.RakNet.UNASSIGNED_SYSTEM_ADDRESS), true);
}
testBitStream2.Reset();
testBitStream2 = new BitStream(bitStreamTestPacket.data, bitStreamTestPacket.length, true);
testBitStream2.IgnoreBytes(1);
testBitStream2.ResetReadPointer();
testBitStream2.IgnoreBits(8);
testBitStream2.ResetReadPointer();
testBitStream2.ReadBits(testBuffer, 8);
Console.WriteLine(testBuffer[0]);
Console.WriteLine(DefaultMessageIDTypes.ID_USER_PACKET_ENUM);
testBitStream2.ResetReadPointer();
testBitStream2.ReadAlignedVar8(testBuffer);
Console.WriteLine(testBuffer[0]);
testBitStream2.ResetReadPointer();
testBitStream2.ReadAlignedVar16(testBuffer);
Console.WriteLine(testBuffer[1]);
testBitStream2.ResetReadPointer();
testBitStream2.ReadAlignedVar32(testBuffer);
Console.WriteLine(testBuffer[1]);
testBitStream2.ResetReadPointer();
testBitStream2.IgnoreBits(8);
Console.WriteLine("testBitStream1 hex and bits");
testBitStream1.PrintHex();
Console.WriteLine("\n");
testBitStream1.PrintBits();
Console.WriteLine("\ntestBitStream1 hex and bits");
Console.WriteLine("testBitStream2 hex and bits end");
testBitStream2.PrintHex();
Console.WriteLine("\n");
testBitStream2.PrintBits();
Console.WriteLine("\ntestBitStream2 hex and bits end");
String testString;
Console.WriteLine("testBitStream2 hex and bits string output");
testBitStream2.PrintHex(out testString);
Console.WriteLine(testString + "\n");
testBitStream2.PrintBits(out testString);
Console.WriteLine(testString);
Console.WriteLine("testBitStream2 hex and bits string output end");
testBitStream2.Read(out testString);
Console.WriteLine(testString);
Console.WriteLine(testBitStream2.ReadCompressed(out testString));
Console.WriteLine(testString);
testBitStream2.WriteCompressedDelta("xy", "yz");
testBitStream2.WriteCompressedDelta("xy", "xy");
Console.WriteLine(testBitStream2.ReadCompressedDelta(out testString));
Console.WriteLine(testString);
Console.WriteLine(testBitStream2.ReadCompressedDelta(out testString));
Console.WriteLine(testString);
testBitStream2.WriteDelta("xy", "yz");
testBitStream2.WriteDelta("xy", "xy");
Console.WriteLine(testBitStream2.ReadDelta(out testString));
Console.WriteLine(testString);
Console.WriteLine(testBitStream2.ReadDelta(out testString));