WriteUInt16() public method

public WriteUInt16 ( int value ) : void
value int
return void
Esempio n. 1
0
            private static byte[] CreateBody(long local_timestamp)
            {
                var s = new MemoryStream();

                using (var writer = new RTMPBinaryWriter(s)) {
                    writer.WriteUInt16((int)UserControlMessageType.PingResponse);
                    writer.WriteUInt32(local_timestamp);
                }
                return(s.ToArray());
            }
Esempio n. 2
0
            private static byte[] CreateBody(long target_stream_id)
            {
                var s = new MemoryStream();

                using (var writer = new RTMPBinaryWriter(s)) {
                    writer.WriteUInt16((int)UserControlMessageType.StreamIsRecorded);
                    writer.WriteUInt32(target_stream_id);
                }
                return(s.ToArray());
            }
Esempio n. 3
0
        private static byte[] CreateBody(UserControlMessageType message_type, byte[] payload)
        {
            var s = new MemoryStream();

            using (var writer = new RTMPBinaryWriter(s)) {
                writer.WriteUInt16((int)message_type);
                writer.Write(payload);
            }
            return(s.ToArray());
        }
Esempio n. 4
0
            private static byte[] CreateBody(long target_stream_id, TimeSpan buffer_length)
            {
                var s = new MemoryStream();

                using (var writer = new RTMPBinaryWriter(s)) {
                    writer.WriteUInt16((int)UserControlMessageType.SetBufferLength);
                    writer.WriteUInt32(target_stream_id);
                    writer.WriteUInt32((long)buffer_length.TotalMilliseconds);
                }
                return(s.ToArray());
            }
Esempio n. 5
0
 private static byte[] CreateBody(long local_timestamp)
 {
     var s = new MemoryStream();
     using (var writer=new RTMPBinaryWriter(s)) {
       writer.WriteUInt16((int)UserControlMessageType.PingResponse);
       writer.WriteUInt32(local_timestamp);
     }
     return s.ToArray();
 }
Esempio n. 6
0
 private static byte[] CreateBody(UserControlMessageType message_type, byte[] payload)
 {
     var s = new MemoryStream();
       using (var writer=new RTMPBinaryWriter(s)) {
     writer.WriteUInt16((int)message_type);
     writer.Write(payload);
       }
       return s.ToArray();
 }
Esempio n. 7
0
 private static byte[] CreateBody(long target_stream_id)
 {
     var s = new MemoryStream();
     using (var writer=new RTMPBinaryWriter(s)) {
       writer.WriteUInt16((int)UserControlMessageType.StreamIsRecorded);
       writer.WriteUInt32(target_stream_id);
     }
     return s.ToArray();
 }
Esempio n. 8
0
 private static byte[] CreateBody(long target_stream_id, TimeSpan buffer_length)
 {
     var s = new MemoryStream();
     using (var writer=new RTMPBinaryWriter(s)) {
       writer.WriteUInt16((int)UserControlMessageType.SetBufferLength);
       writer.WriteUInt32(target_stream_id);
       writer.WriteUInt32((long)buffer_length.TotalMilliseconds);
     }
     return s.ToArray();
 }