示例#1
0
        private void createStream()
        {
            var writer = new AmfWriter();

            writer.WriteString("createStream");
            writer.WriteNumber(4);
            writer.WriteNull();
            SendAmf(writer);
        }
示例#2
0
        private void publish(string id)
        {
            var writer = new AmfWriter();

            writer.WriteString("publish");
            writer.WriteNumber(0);
            writer.WriteNull();
            writer.WriteString(id);
            writer.WriteString("live");
            SendAmf(writer);
        }
示例#3
0
        private void Connect(string type = "app")
        {
            var writer = new AmfWriter();

            writer.WriteString("connect");
            writer.WriteNumber(1);
            var connectObject = new AmfObject();

            connectObject.Strings.Add("app", "app");
            writer.WriteObject(connectObject);
            SendAmf(writer);
        }
示例#4
0
        public void Stop()
        {
            var amfWriter = new AmfWriter();

            amfWriter.WriteString("deleteStream");
            amfWriter.WriteNumber(7);
            amfWriter.WriteNull();
            amfWriter.WriteNumber(1);
            SendAmf(amfWriter);

            tcpClient.Close();
        }
示例#5
0
 public void SendAmf(AmfWriter amf)
 {
     sendMessage(amf.GetByteArray(), RtmpMessageTypeId.AMF0);
 }
示例#6
0
 public void SendAmf(AmfWriter amf)
 {
     sendMessage(amf.GetByteArray(), RtmpMessageTypeId.AMF0);
 }
示例#7
0
 private void publish(string id)
 {
     var writer = new AmfWriter();
     writer.WriteString("publish");
     writer.WriteNumber(0);
     writer.WriteNull();
     writer.WriteString(id);
     writer.WriteString("live");
     SendAmf(writer);
 }
示例#8
0
 private void createStream()
 {
     var writer = new AmfWriter();
     writer.WriteString("createStream");
     writer.WriteNumber(4);
     writer.WriteNull();
     SendAmf(writer);
 }
示例#9
0
 private void Connect(string type = "app")
 {
     var writer = new AmfWriter();
     writer.WriteString("connect");
     writer.WriteNumber(1);
     var connectObject = new AmfObject();
     connectObject.Strings.Add("app", "app");
     writer.WriteObject(connectObject);
     SendAmf(writer);
 }
示例#10
0
        public void Stop()
        {
            var amfWriter = new AmfWriter();
            amfWriter.WriteString("deleteStream");
            amfWriter.WriteNumber(7);
            amfWriter.WriteNull();
            amfWriter.WriteNumber(1);
            SendAmf(amfWriter);

            tcpClient.Close();
        }