Command

abstract class Command(var name: String = "", var commandId: Int, timeStamp: Int, streamId: Int = 0, basicHeader: BasicHeader) : RtmpMessage

Created by pedro on 8/04/21.

Represent packets like connect, createStream, play, pause... Can be encoded using AMF0 or AMF3

TODO use amf3 or amf0 depend of getType method

Inheritors

Constructors

Link copied to clipboard
constructor(name: String = "", commandId: Int, timeStamp: Int, streamId: Int = 0, basicHeader: BasicHeader)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
abstract fun getCode(): String
Link copied to clipboard
abstract fun getDescription(): String
Link copied to clipboard
open override fun getSize(): Int
Link copied to clipboard
abstract fun getStreamId(): Int
Link copied to clipboard
abstract fun getType(): MessageType
Link copied to clipboard
abstract fun readBody(input: InputStream)
Link copied to clipboard
abstract fun storeBody(): ByteArray
Link copied to clipboard
fun updateHeader(rtmpHeader: RtmpHeader)
Link copied to clipboard
suspend fun writeBody(socket: RtmpSocket)
Link copied to clipboard
suspend fun writeHeader(socket: RtmpSocket)