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()); }
public static async Task LoginReply(this Presence p, LoginReplies reply) { await p.LoginReply((int)reply); }
public static async Task LoginReply(this Presence p, LoginReplies reply, SerializationWriter writer) { await p.LoginReply((int)reply, writer); }