示例#1
0
            static RtmpMessage ReadCommand(ObjectEncoding encoding, PacketContentType type, AmfReader r)
            {
                var name     = (string)r.ReadAmfObject(encoding);
                var invokeId = Convert.ToUInt32(r.ReadAmfObject(encoding));
                var headers  = r.ReadAmfObject(encoding);

                var args = new List <object>();

                while (r.Remaining > 0)
                {
                    args.Add(r.ReadAmfObject(encoding));
                }

                return(new Invoke(type)
                {
                    MethodName = name, Arguments = args.ToArray(), InvokeId = invokeId, Headers = headers
                });
            }
示例#2
0
 protected ByteData(byte[] data, PacketContentType type) : base(type)
     => Data = data;
示例#3
0
 protected RtmpMessage(PacketContentType contentType) => ContentType = contentType;
示例#4
0
 protected Notify(PacketContentType type) : base(type)
 {
 }
 internal Invoke(uint streamId, PacketContentType type) : base(streamId, type)
 {
 }
 protected ByteData(uint streamId, byte[] data, PacketContentType type) : base(streamId, type) =>
 internal SharedObject(uint streamId, PacketContentType type) : base(streamId, type)
 {
 }
 protected RtmpMessage(uint streamId, PacketContentType contentType)
 {
     StreamId = streamId; ContentType = contentType;
 }
 internal Notify(uint streamId, PacketContentType type) : base(streamId, type)
 {
 }
示例#10
0
 public Packet(int streamId, PacketContentType type, Space <byte> span)
 {
     StreamId = streamId;
     Type     = type;
     Span     = span;
 }
示例#11
0
 public Invoke(PacketContentType type) : base(type)
 {
 }