public static Offset <Chat> CreateChat(FlatBufferBuilder builder, short opcode = 12, short chatId = 0) { builder.StartTable(2); Chat.AddChatId(builder, chatId); Chat.AddOpcode(builder, opcode); return(Chat.EndChat(builder)); }
public static byte[] MakeChatBuffer(int chatId) { var builder = new MessageBuilder(); Chat.StartChat(builder); Chat.AddOpcode(builder, (sbyte)Opcode.Chat); Chat.AddChatId(builder, (short)chatId); var offset = Chat.EndChat(builder); builder.Finish(offset.Value); return(builder.SizedByteArray()); }