Example #1
0
        private bool WriteContentsRecord(PacketObject packet, FileFormatWriterOptionImpl option, BinaryWriter writer)
        {
            if (packet.Attribute != PacketAttribute.Data)
            {
                return(true);
            }

#if false
            switch (option.SaveData)
            {
            case SaveDataType.RecvDataOnly:
                if (packet.Direction != PacketDirection.Recv)
                {
                    return(true);
                }
                break;

            case SaveDataType.SendDataOnly:
                if (packet.Direction != PacketDirection.Send)
                {
                    return(true);
                }
                break;
            }
#endif
            writer.Write(packet.Data);

            return(true);
        }
Example #2
0
        protected override bool OnOpenStream(FileFormatOption option, Stream stream)
        {
            writer_ = new BinaryWriter(stream);
            option_ = option as FileFormatWriterOptionImpl;

            return(true);
        }