Esempio n. 1
0
        public static async Task <byte[]> LoginReplyAsync(LoginReplies reply)
        {
            var packet = new Packet
            {
                Type = PacketType.ServerLoginReply
            };

            await using var writer = new SerializationWriter(new MemoryStream());
            writer.Write((int)reply);

            packet.Data = ((MemoryStream)writer.BaseStream).ToArray();

            var pWriter = new PacketWriter();
            await pWriter.Write(packet);

            return(pWriter.ToBytes());
        }
Esempio n. 2
0
 public static async Task LoginReply(this Presence p, LoginReplies reply)
 {
     await p.LoginReply((int)reply);
 }
Esempio n. 3
0
 public static async Task LoginReply(this Presence p, LoginReplies reply, SerializationWriter writer)
 {
     await p.LoginReply((int)reply, writer);
 }