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

bool ReadXXX(out result) versions added for some read methods

This commit is contained in:
lidgren
2011-12-06 18:31:05 +00:00
parent ba7cf8f381
commit 123c5d6c00
2 changed files with 125 additions and 2 deletions

View File

@@ -69,7 +69,13 @@ namespace UnitTests
bdr.Append(inc.ReadBoolean());
bdr.Append(inc.ReadInt32(6));
bdr.Append(inc.ReadInt32());
bdr.Append(inc.ReadString());
string strResult;
bool ok = inc.ReadString(out strResult);
if (ok == false)
throw new NetException("Read/write failure");
bdr.Append(strResult);
bdr.Append(inc.ReadByte());
if (inc.PeekUInt16() != (ushort)44)