Exemplo n.º 1
0
        private void createStream()
        {
            var writer = new AmfWriter();

            writer.WriteString("createStream");
            writer.WriteNumber(4);
            writer.WriteNull();
            SendAmf(writer);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
        public void Stop()
        {
            var amfWriter = new AmfWriter();

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

            tcpClient.Close();
        }
Exemplo n.º 5
0
 public void SendAmf(AmfWriter amf)
 {
     sendMessage(amf.GetByteArray(), RtmpMessageTypeId.AMF0);
 }
Exemplo n.º 6
0
 public void SendAmf(AmfWriter amf)
 {
     sendMessage(amf.GetByteArray(), RtmpMessageTypeId.AMF0);
 }
Exemplo n.º 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);
 }
Exemplo n.º 8
0
 private void createStream()
 {
     var writer = new AmfWriter();
     writer.WriteString("createStream");
     writer.WriteNumber(4);
     writer.WriteNull();
     SendAmf(writer);
 }
Exemplo n.º 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);
 }
Exemplo n.º 10
0
        public void Stop()
        {
            var amfWriter = new AmfWriter();
            amfWriter.WriteString("deleteStream");
            amfWriter.WriteNumber(7);
            amfWriter.WriteNull();
            amfWriter.WriteNumber(1);
            SendAmf(amfWriter);

            tcpClient.Close();
        }