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


C# NWriter.WriteUTF方法代码示例

本文整理汇总了C#中NWriter.WriteUTF方法的典型用法代码示例。如果您正苦于以下问题:C# NWriter.WriteUTF方法的具体用法?C# NWriter.WriteUTF怎么用?C# NWriter.WriteUTF使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NWriter的用法示例。


在下文中一共展示了NWriter.WriteUTF方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Write

 public string Write()
 {
     var wtr = new NWriter(new MemoryStream());
     wtr.WriteUTF(accId);
     wtr.WriteUTF(giftCode);
     return Convert.ToBase64String(((MemoryStream)wtr.BaseStream).ToArray());
 }
开发者ID:OryxAwakening,项目名称:Fabiano_Swagger_of_Doom,代码行数:7,代码来源:AccountDataHelper.cs

示例2: Write

 protected override void Write(Client client, NWriter wtr)
 {
     wtr.Write(Tier);
     wtr.WriteUTF(Goal);
     wtr.WriteUTF(Description);
     wtr.WriteUTF(Image);
 }
开发者ID:OryxAwakening,项目名称:Fabiano_Swagger_of_Doom,代码行数:7,代码来源:QuestFetchResponsePacket.cs

示例3: Write

 protected override void Write(ClientProcessor psr, NWriter wtr)
 {
     wtr.WriteUTF(Title);
     wtr.WriteUTF(Message);
     wtr.WriteUTF(Button1);
     wtr.WriteUTF(Button2);
     wtr.WriteUTF(Type);
 }
开发者ID:Zeroeh,项目名称:PrivateServerOld,代码行数:8,代码来源:TextBoxPacket.cs

示例4: Write

 protected override void Write(Client psr, NWriter wtr)
 {
     wtr.WriteUTF(AccountId);
     wtr.Write(CharId);
     wtr.WriteUTF(Killer);
     wtr.Write(obf0);
     wtr.Write(obf1);
 }
开发者ID:SirAnuse,项目名称:fabiano-swagger-of-doom,代码行数:8,代码来源:DeathPacket.cs

示例5: Write

 protected override void Write(NWriter wtr)
 {
     wtr.WriteUTF(Title);
     wtr.WriteUTF(Message);
     wtr.WriteUTF(Button1);
     wtr.WriteUTF(Button2);
     wtr.WriteUTF(Type);
 }
开发者ID:Club559,项目名称:Travs-Domain-Server,代码行数:8,代码来源:TextBoxPacket.cs

示例6: Write

 protected override void Write(Client client, NWriter wtr)
 {
     wtr.WriteUTF(Name);
     wtr.Write(ObjectId);
     wtr.Write(Stars);
     wtr.Write(BubbleTime);
     wtr.WriteUTF(Recipient);
     wtr.WriteUTF(Text);
     wtr.WriteUTF(CleanText);
 }
开发者ID:BlackRayquaza,项目名称:MMOE,代码行数:10,代码来源:TextPacket.cs

示例7: Write

 protected override void Write(ClientProcessor psr, NWriter wtr)
 {
     wtr.WriteUTF(Name);
     wtr.WriteUTF(Host);
     wtr.Write(Port);
     wtr.Write(GameId);
     wtr.Write(KeyTime);
     wtr.Write((short) Key.Length);
     wtr.Write(Key);
 }
开发者ID:RoxyLalonde,项目名称:Phoenix-Realms,代码行数:10,代码来源:ReconnectPacket.cs

示例8: Write

 protected override void Write(Client psr, NWriter wtr)
 {
     wtr.WriteUTF(Name);
     wtr.WriteUTF(Host);
     wtr.Write(Port);
     wtr.Write(GameId);
     wtr.Write(KeyTime);
     wtr.Write(IsFromArena);
     wtr.Write((ushort)Key.Length);
     wtr.Write(Key);
 }
开发者ID:OryxAwakening,项目名称:Fabiano_Swagger_of_Doom,代码行数:11,代码来源:ReconnectPacket.cs

示例9: Write

 protected override void Write(Client psr, NWriter wtr)
 {
     wtr.Write(AccountListId);
     wtr.Write((ushort) AccountIds.Length);
     foreach (string i in AccountIds)
         wtr.WriteUTF(i);
     wtr.Write(LockAction);
 }
开发者ID:SirAnuse,项目名称:fabiano-swagger-of-doom,代码行数:8,代码来源:AccountListPacket.cs

示例10: Write

        protected override void Write(Client psr, NWriter wtr)
        {
            wtr.Write((ushort) MyItems.Length);
            foreach (TradeItem i in MyItems)
                i.Write(psr, wtr);

            wtr.WriteUTF(YourName);
            wtr.Write((ushort) YourItems.Length);
            foreach (TradeItem i in YourItems)
                i.Write(psr, wtr);
        }
开发者ID:SirAnuse,项目名称:fabiano-swagger-of-doom,代码行数:11,代码来源:TradeStartPacket.cs

示例11: Write

        protected override void Write(ClientProcessor psr, NWriter wtr)
        {
            wtr.Write((short)MyItems.Length);
            foreach (var i in MyItems)
                i.Write(wtr);

            wtr.WriteUTF(YourName);
            wtr.Write((short)YourItems.Length);
            foreach (var i in YourItems)
                i.Write(wtr);
        }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:11,代码来源:TradeStartPacket.cs

示例12: Write

 protected override void Write(ClientProcessor psr, NWriter wtr)
 {
     wtr.WriteUTF(Copyright);
     wtr.WriteUTF(BuildVersion);
     wtr.Write(GameId);
     wtr.WriteUTF(RSA.Instance.Encrypt(GUID));
     wtr.Write(AnotherThing);
     wtr.WriteUTF(RSA.Instance.Encrypt(Password));
     wtr.WriteUTF(RSA.Instance.Encrypt(Secret));
     wtr.Write(KeyTime);
     wtr.Write((short)Key.Length);
     wtr.Write(Key);
     wtr.Write32UTF(MapInfo);
     wtr.WriteUTF(__Rw);
     wtr.WriteUTF(__06U);
     wtr.WriteUTF(__LK);
     wtr.WriteUTF(PlayPlatform);
 }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:18,代码来源:HelloPacket.cs

示例13: Write

 protected override void Write(NWriter wtr)
 {
     wtr.WriteUTF(BuildVersion);
     wtr.Write(GameId);
     wtr.WriteUTF(RSA.Instance.Encrypt(GUID));
     wtr.WriteUTF(RSA.Instance.Encrypt(Password));
     wtr.WriteUTF(RSA.Instance.Encrypt(Secret));
     wtr.Write(KeyTime);
     wtr.Write((short)Key.Length);
     wtr.Write(Key);
     wtr.Write32UTF(MapInfo);
     wtr.WriteUTF(__Rw);
     wtr.WriteUTF(__06U);
     wtr.WriteUTF(__LK);
     wtr.WriteUTF(PlayPlatform);
 }
开发者ID:Jankos132,项目名称:Server-Source,代码行数:16,代码来源:HelloPacket.cs

示例14: Write

 protected override void Write(Client psr, NWriter wtr)
 {
     wtr.WriteUTF(BuildVersion);
     wtr.Write(GameId);
     wtr.Write(0);
     wtr.WriteUTF(RSA.Instance.Encrypt(GUID));
     wtr.Write(randomint1);
     wtr.WriteUTF(RSA.Instance.Encrypt(Password));
     wtr.WriteUTF(Secret);
     wtr.Write(KeyTime);
     wtr.Write((ushort)Key.Length);
     wtr.Write(Key);
     wtr.Write(MapInfo.Length);
     wtr.Write(MapInfo);
     wtr.WriteUTF(obf1);
     wtr.WriteUTF(obf2);
     wtr.WriteUTF(obf3);
     wtr.WriteUTF(obf4);
     wtr.WriteUTF(obf5);
 }
开发者ID:OryxAwakening,项目名称:Fabiano_Swagger_of_Doom,代码行数:20,代码来源:HelloPacket.cs

示例15: TestHello

        public void TestHello(string username, string password)
        {
            var s = new MemoryStream();
            using (var wtr = new NWriter(s))
            {
                wtr.WriteUTF("0.5.2");
                wtr.Write(-2);
                wtr.WriteUTF(RSA.Instance.Encrypt(username));
                wtr.WriteUTF(RSA.Instance.Encrypt(password));
                wtr.WriteUTF(RSA.Instance.Encrypt(""));
                wtr.Write(0);
                wtr.Write(1);
                wtr.Write(new byte[] { 1 });
                wtr.Write32UTF("");
                wtr.WriteUTF("");
                wtr.WriteUTF("");
                wtr.WriteUTF("");
                wtr.WriteUTF("");
            }

            SendPacket(new Packet(PacketID.Hello, s.ToArray()));
            Console.WriteLine("Receiving MapInfo packet...");
            var pkt = ReceivePacket(PacketID.MapInfo);

            using (var rdr = new NReader(new MemoryStream(pkt.body)))
            {
                var Width = rdr.ReadInt32();
                var Height = rdr.ReadInt32();
                var Name = rdr.ReadUTF();
                var Seed = rdr.ReadUInt32();
                var Background = rdr.ReadInt32();
                var AllowTeleport = rdr.ReadBoolean();
                var ShowDisplays = rdr.ReadBoolean();

                var ClientXML = new string[rdr.ReadInt16()];
                for (var i = 0; i < ClientXML.Length; i++)
                    ClientXML[i] = rdr.Read32UTF();

                var ExtraXML = new string[rdr.ReadInt16()];
                for (var i = 0; i < ExtraXML.Length; i++)
                    ExtraXML[i] = rdr.Read32UTF();

                Console.WriteLine("Grabbed info from " + Name + ".");
                Console.WriteLine("There are " + ExtraXML.Length + " XML files.");
            }
        }
开发者ID:BlackRayquaza,项目名称:PhoenixRealms,代码行数:46,代码来源:Client.cs


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