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

major update; gen 3.5

This commit is contained in:
lidgren
2010-10-19 17:45:55 +00:00
parent baaa5926f8
commit 609bc1afe2
167 changed files with 4065 additions and 9640 deletions

View File

@@ -88,26 +88,7 @@ namespace UnitTests
NetException.Assert(readTest.Number == 42);
NetException.Assert(readTest.Name == "Hallon");
NetException.Assert(readTest.Age == 8.2f);
msg = peer.CreateMessage();
System.IO.BinaryWriter br = new System.IO.BinaryWriter(msg);
br.Write(true);
br.Write("hallon");
br.Write((byte)42);
int byteLen = msg.LengthBytes;
byte[] rbts = msg.PeekDataBuffer();
inc = Program.CreateIncomingMessage(rbts, msg.LengthBits);
System.IO.BinaryReader rdr = new System.IO.BinaryReader(inc);
bool one = rdr.ReadBoolean();
string hallon = rdr.ReadString();
byte fourtyTwo = rdr.ReadByte();
// test aligned WriteBytes/ReadBytes
msg = peer.CreateMessage();
byte[] tmparr = new byte[] { 5, 6, 7, 8, 9 };