Ejemplo n.º 1
0
        /// <summary>
        /// Writes an AMF body.
        /// </summary>
        /// <param name="output">The output stream</param>
        /// <param name="body">The body to write</param>
        private static void WriteAMFBody(AMFDataOutput output, AMFBody body)
        {
            output.WriteShortString(body.RequestTarget);
            output.WriteShortString(body.ResponseTarget);
            output.WriteUnsignedInt(0xffffffff); // body length ignored

            WriteAMFContent(output, body.Content);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Writes an AMF header.
        /// </summary>
        /// <param name="output">The output stream</param>
        /// <param name="header">The header to write</param>
        private static void WriteAMFHeader(AMFDataOutput output, AMFHeader header)
        {
            output.WriteShortString(header.Name);
            output.WriteBoolean(header.MustUnderstand);
            output.WriteUnsignedInt(0xffffffff); // header length ignored

            WriteAMFContent(output, header.Content);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Writes an AMF header.
        /// </summary>
        /// <param name="output">The output stream</param>
        /// <param name="header">The header to write</param>
        private static void WriteAMFHeader(AMFDataOutput output, AMFHeader header)
        {
            output.WriteShortString(header.Name);
            output.WriteBoolean(header.MustUnderstand);
            output.WriteUnsignedInt(0xffffffff); // header length ignored

            WriteAMFContent(output, header.Content);
        }
Ejemplo n.º 4
0
 void IASValueVisitor.VisitString(IActionScriptSerializer serializer, string value)
 {
     if (output.IsShortString(value))
     {
         output.WriteByte((byte)AMF0ObjectTypeCode.ShortString);
         output.WriteShortString(value);
     }
     else
     {
         output.WriteByte((byte)AMF0ObjectTypeCode.LongString);
         output.WriteLongString(value);
     }
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Writes an AMF body.
        /// </summary>
        /// <param name="output">The output stream</param>
        /// <param name="body">The body to write</param>
        private static void WriteAMFBody(AMFDataOutput output, AMFBody body)
        {
            output.WriteShortString(body.RequestTarget);
            output.WriteShortString(body.ResponseTarget);
            output.WriteUnsignedInt(0xffffffff); // body length ignored

            WriteAMFContent(output, body.Content);
        }