1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 22:56:30 +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

@@ -60,7 +60,7 @@ namespace UnitTests
if (bcnt != 2)
throw new NetException("WriteVariable* wrote too many bytes!");
byte[] data = msg.PeekDataBuffer();
byte[] data = msg.Data;
NetIncomingMessage inc = Program.CreateIncomingMessage(data, msg.LengthBits);
@@ -119,7 +119,7 @@ namespace UnitTests
tmp.WriteAllFields(test, BindingFlags.Public | BindingFlags.Instance);
data = tmp.PeekDataBuffer();
data = tmp.Data;
inc = Program.CreateIncomingMessage(data, tmp.LengthBits);
@@ -135,7 +135,7 @@ namespace UnitTests
byte[] tmparr = new byte[] { 5, 6, 7, 8, 9 };
msg.Write(tmparr);
inc = Program.CreateIncomingMessage(msg.PeekDataBuffer(), msg.LengthBits);
inc = Program.CreateIncomingMessage(msg.Data, msg.LengthBits);
byte[] result = inc.ReadBytes(tmparr.Length);
for (int i = 0; i < tmparr.Length; i++)