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 }); }
protected ByteData(byte[] data, PacketContentType type) : base(type) => Data = data;
protected RtmpMessage(PacketContentType contentType) => ContentType = contentType;
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) { }
public Packet(int streamId, PacketContentType type, Space <byte> span) { StreamId = streamId; Type = type; Span = span; }
public Invoke(PacketContentType type) : base(type) { }