当前位置: 首页>>代码示例>>C#>>正文


C# UruStream.ReadInt方法代码示例

本文整理汇总了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);
     }
 }
开发者ID:Hoikas,项目名称:mudpit,代码行数:10,代码来源:VaultMessages.cs

示例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();
 }
开发者ID:Hoikas,项目名称:mudpit,代码行数:12,代码来源:NetCliCore.cs

示例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());
 }
开发者ID:Hoikas,项目名称:mudpit,代码行数:8,代码来源:AuthMessages.cs

示例4: Read

 public void Read(UruStream s)
 {
     fTransID = s.ReadUInt();
     fResult = (ENetError)s.ReadInt();
 }
开发者ID:Hoikas,项目名称:mudpit,代码行数:5,代码来源:GameMessages.cs

示例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
            }
        }
开发者ID:Hoikas,项目名称:mudpit,代码行数:43,代码来源:FileClient.cs

示例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:
//.........这里部分代码省略.........
开发者ID:Hoikas,项目名称:mudpit,代码行数:101,代码来源:VaultNode.cs


注:本文中的MUd.UruStream.ReadInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。