Example #1
0
 public override List<byte[]> DoFragment(int max_frag_length)
 {
     MemoryStream stm = new MemoryStream();
     BinaryWriter writer = new BinaryWriter(stm);
     writer.Write(_max_xmit_frag);
     writer.Write(_max_recv_frag);
     writer.Write(0); // assoc_group_id.
     ContextElement.WriteList(writer, Elements);
     return new List<byte[]>() { stm.ToArray() };
 }
Example #2
0
        public override byte[] ToArray()
        {
            MemoryStream stm    = new MemoryStream();
            BinaryWriter writer = new BinaryWriter(stm);

            writer.Write(_max_xmit_frag);
            writer.Write(_max_recv_frag);
            writer.Write(0); // assoc_group_id.
            ContextElement.WriteList(writer, Elements);
            return(stm.ToArray());
        }