本文整理汇总了C#中MUd.UruStream.ReadInt方法的典型用法代码示例。如果您正苦于以下问题:C# UruStream.ReadInt方法的具体用法?C# UruStream.ReadInt怎么用?C# UruStream.ReadInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MUd.UruStream
的用法示例。
在下文中一共展示了UruStream.ReadInt方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public void Read(UruStream s)
{
fTransID = s.ReadUInt();
fResult = (ENetError)s.ReadInt();
fRefs = new VaultNodeRef[s.ReadInt()];
for (int i = 0; i < fRefs.Length; i++) {
fRefs[i] = new VaultNodeRef();
fRefs[i].Read(s);
}
}
示例2: Read
public void Read(UruStream s)
{
fInstanceUuid = new Guid(s.ReadBytes(16));
fFilename = s.ReadUnicodeStringF(64);
fInstanceName = s.ReadUnicodeStringF(64);
fUserName = s.ReadUnicodeStringF(64);
fDescription = s.ReadUnicodeStringF(1024);
fSequenceNumber = s.ReadUInt();
fLanguage = s.ReadInt();
fPopulation = s.ReadUInt();
fCurrPopulation = s.ReadUInt();
}
示例3: Read
public void Read(UruStream s)
{
fTransID = s.ReadUInt();
fResult = (ENetError)s.ReadInt();
fFileSize = s.ReadUInt();
fChunkPos = s.ReadUInt();
fChunkData = s.ReadBytes(s.ReadInt());
}
示例4: Read
public void Read(UruStream s)
{
fTransID = s.ReadUInt();
fResult = (ENetError)s.ReadInt();
}
示例5: IReceive
private void IReceive(IAsyncResult ar)
{
try {
lock (fSocket) {
fSocket.EndReceive(ar);
ResetIdleTimer();
//Size
byte[] buf = new byte[4];
fSocket.Receive(buf);
//Message
buf = new byte[BitConverter.ToInt32(buf, 0) - 4];
fSocket.Receive(buf);
fStream = new UruStream(new MemoryStream(buf));
FileSrv2Cli msg = (FileSrv2Cli)fStream.ReadInt();
switch (msg) {
case FileSrv2Cli.BuildIdReply:
IGotBuildID();
break;
case FileSrv2Cli.PingReply:
IPong();
break;
default:
string test = Enum.GetName(typeof(FileSrv2Cli), msg);
throw new NotSupportedException(msg.ToString("X") + " - " + test);
}
fStream.Close();
}
fSocket.BeginReceive(new byte[2], 0, 2, SocketFlags.Peek, new AsyncCallback(IReceive), null);
} catch (ObjectDisposedException) {
} catch (SocketException) {
fSocket.Close();
#if !DEBUG
} catch (Exception e) {
FireException(e);
#endif
}
}
示例6: Read
public void Read(UruStream s)
{
ulong bit = 1;
Fields f = (Fields)s.ReadULong();
while (bit != 0 && bit <= (ulong)f) {
switch (f & (Fields)bit) {
case Fields.kBlob_1:
fBlob[0] = s.ReadBytes(s.ReadInt());
break;
case Fields.kBlob_2:
fBlob[1] = s.ReadBytes(s.ReadInt());
break;
case Fields.kCreateAgeName:
fCreateAgeName = s.ReadUnicodeStringV32();
break;
case Fields.kCreateAgeUuid:
fCreateAgeUuid = new Guid(s.ReadBytes(16));
break;
case Fields.kCreateTime:
fCreateTime = ToDateTime(s.ReadUInt());
break;
case Fields.kCreatorIdx:
fCreatorIdx = s.ReadUInt();
break;
case Fields.kCreatorUuid:
fCreatorUuid = new Guid(s.ReadBytes(16));
break;
case Fields.kInt32_1:
fInt32[0] = s.ReadInt();
break;
case Fields.kInt32_2:
fInt32[1] = s.ReadInt();
break;
case Fields.kInt32_3:
fInt32[2] = s.ReadInt();
break;
case Fields.kInt32_4:
fInt32[3] = s.ReadInt();
break;
case Fields.kIString64_1:
fIString64[0] = s.ReadUnicodeStringV32();
break;
case Fields.kIString64_2:
fIString64[1] = s.ReadUnicodeStringV32();
break;
case Fields.kModifyTime:
fModifyTime = ToDateTime(s.ReadUInt());
break;
case Fields.kNodeIdx:
fIdx = s.ReadUInt();
break;
case Fields.kNodeType:
fNodeType = (ENodeType)s.ReadUInt();
break;
case Fields.kString64_1:
fString64[0] = s.ReadUnicodeStringV32();
break;
case Fields.kString64_2:
fString64[1] = s.ReadUnicodeStringV32();
break;
case Fields.kString64_3:
fString64[2] = s.ReadUnicodeStringV32();
break;
case Fields.kString64_4:
fString64[3] = s.ReadUnicodeStringV32();
break;
case Fields.kString64_5:
fString64[4] = s.ReadUnicodeStringV32();
break;
case Fields.kString64_6:
fString64[5] = s.ReadUnicodeStringV32();
break;
case Fields.kText_1:
fText[0] = s.ReadUnicodeStringV32();
break;
case Fields.kText_2:
fText[0] = s.ReadUnicodeStringV32();
break;
case Fields.kUInt32_1:
fUInt32[0] = s.ReadUInt();
break;
case Fields.kUInt32_2:
fUInt32[1] = s.ReadUInt();
break;
case Fields.kUInt32_3:
fUInt32[2] = s.ReadUInt();
break;
case Fields.kUInt32_4:
fUInt32[3] = s.ReadUInt();
break;
case Fields.kUuid_1:
fUuid[0] = new Guid(s.ReadBytes(16));
break;
case Fields.kUuid_2:
fUuid[1] = new Guid(s.ReadBytes(16));
break;
case Fields.kUuid_3:
fUuid[2] = new Guid(s.ReadBytes(16));
break;
case Fields.kUuid_4:
//.........这里部分代码省略.........