using System; namespace Inspectron.HawkEye.RTSP.Messages { public class RtspRequestSetup : RtspRequest { // Constructor public RtspRequestSetup() { Command = "SETUP * RTSP/1.0"; } /// /// Gets the transports associate with the request. /// /// The transport. public RtspTransport[] GetTransports() { if (!Headers.ContainsKey(RtspHeaderNames.Transport)) return new RtspTransport[] { new RtspTransport() }; string[] items = Headers[RtspHeaderNames.Transport].Split(','); return Array.ConvertAll(items, new Converter(RtspTransport.Parse)); } public void AddTransport(RtspTransport newTransport) { string actualTransport = string.Empty; if(Headers.ContainsKey(RtspHeaderNames.Transport)) actualTransport = Headers[RtspHeaderNames.Transport] + ","; Headers[RtspHeaderNames.Transport] = actualTransport + newTransport.ToString(); } } }