Exemplo n.º 1
0
 private void WriteHeader(AMFHeader header, ObjectEncoding objectEncoding)
 {
     base.Reset();
     base.WriteUTF(header.Name);
     base.WriteBoolean(header.MustUnderstand);
     base.WriteInt32(-1);
     base.WriteData(objectEncoding, header.Content);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Removes the named header from teh AMF packet.
 /// </summary>
 /// <param name="header">The name of the header.</param>
 public void RemoveHeader(string header)
 {
     for (int i = 0; _headers != null && i < _headers.Count; i++)
     {
         AMFHeader amfHeader = _headers[i] as AMFHeader;
         if (amfHeader.Name == header)
         {
             _headers.RemoveAt(i);
         }
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Gets the value of a single AMF header object by name.
 /// </summary>
 /// <param name="header">The name of the header.</param>
 /// <returns>The header referenced by name.</returns>
 public AMFHeader GetHeader(string header)
 {
     for (int i = 0; _headers != null && i < _headers.Count; i++)
     {
         AMFHeader amfHeader = _headers[i] as AMFHeader;
         if (amfHeader.Name == header)
         {
             return(amfHeader);
         }
     }
     return(null);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Adds a header to the AMF packet.
 /// </summary>
 /// <param name="header">The header object to add.</param>
 public void AddHeader(AMFHeader header)
 {
     this._headers.Add(header);
 }