public override string ToString() { uint num = 1u; string text = ""; List <RtcpPacket> .Enumerator enumerator = this.Packets.GetEnumerator(); while (enumerator.MoveNext()) { RtcpPacket current = enumerator.Current; text += string.Format("Packet {0}\n{1}", num, current.ToString()); num += 1u; } return(text); }
public byte[] ToByteArray() { byte[] array = null; array = new byte[4096]; uint newSize = 0u; List <RtcpPacket> .Enumerator enumerator = this.Packets.GetEnumerator(); while (enumerator.MoveNext()) { RtcpPacket current = enumerator.Current; current.ToByteArray(array, ref newSize); } Array.Resize <byte>(ref array, (int)newSize); return(array); }
public bool RemovePacket(RtcpPacket packet) { return(this.Packets.Remove(packet)); }
public void AddPacket(RtcpPacket packet) { this.Packets.Add(packet); }