Esempio n. 1
0
        /// <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;
        }
Esempio n. 2
0
 /// <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();
 }
Esempio n. 3
0
 /// <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;
 }