/// <summary> /// Copies to another message. /// </summary> /// <param name="copy">The copy.</param> public void CopyTo(HttpMessage copy) { copy.Headers.Clear(); foreach (string key in this.Headers) copy.Headers[key] = this.Headers[key]; copy.Body = this.Body; }
/// <summary> /// Initializes a new instance of the <see cref="SsdpMessage"/> class. /// </summary> /// <param name="message">The message.</param> /// <param name="source">The source.</param> public SsdpMessage(HttpMessage message, IPEndPoint source) { this.Message = message; this.Source = source; this.ParseMessageData(); }
/// <summary> /// Parses the specified reader. /// </summary> /// <param name="reader">The reader.</param> /// <returns></returns> public static HttpMessage Parse(TextReader reader) { HttpMessage message = new HttpMessage(true); message.FromStream(reader); return message; }