示例#1
0
 public CommandMessage(AmfWriter amfData)
 {
     MHeader.MessageStreamId = 0;
     BHeader.ChunkStreamId = 3;
     MHeader.MessageType = 0x14; //AMF0 encoding is only supported as of now
     Data = amfData.GetByteArray();
 }
示例#2
0
        private void sendToken()
        {
            if (_usher.Streams.Count == 0)
                return;

            AmfWriter writer = new AmfWriter();

            writer.WriteString("NetStream.Authenticate.UsherToken");
            writer.WriteNumber(0);
            writer.WriteNull();
            writer.WriteString(_usher.Streams[0].Token);

            RtmpSharp2.Abstract.CommandMessage message = new CommandMessage(writer);

            SendMessage(message);
            SendMessage(new CreateStream());
            SendMessage(new Play(_usher.Streams[0].PlayStream));
        }