Esempio n. 1
0
        /// <summary>
        /// Writes an AMF message to an output stream and bubbles up exceptions.
        /// </summary>
        /// <param name="output">The output stream</param>
        /// <param name="message">The message to write</param>
        private static void UncheckedWriteAMFMessage(AMFDataOutput output, AMFMessage message)
        {
            output.WriteUnsignedShort(message.Version);

            output.WriteUnsignedShort((ushort)message.Headers.Count);
            foreach (AMFHeader header in message.Headers)
                WriteAMFHeader(output, header);

            output.WriteUnsignedShort((ushort)message.Bodies.Count);
            foreach (AMFBody body in message.Bodies)
                WriteAMFBody(output, body);
        }
Esempio n. 2
0
        /// <summary>
        /// Writes an AMF message to an output stream and bubbles up exceptions.
        /// </summary>
        /// <param name="output">The output stream</param>
        /// <param name="message">The message to write</param>
        private static void UncheckedWriteAMFMessage(AMFDataOutput output, AMFMessage message)
        {
            output.WriteUnsignedShort(message.Version);

            output.WriteUnsignedShort((ushort)message.Headers.Count);
            foreach (AMFHeader header in message.Headers)
            {
                WriteAMFHeader(output, header);
            }

            output.WriteUnsignedShort((ushort)message.Bodies.Count);
            foreach (AMFBody body in message.Bodies)
            {
                WriteAMFBody(output, body);
            }
        }
Esempio n. 3
0
 private void WriteReference(int referenceId)
 {
     output.WriteByte((byte)AMF0ObjectTypeCode.Reference);
     output.WriteUnsignedShort((ushort)referenceId);
 }