Command

class Command(    val data: IMessageBufferReader,     val tag: String,     val category: Int,     val acknowledgeOn: Byte = CommandAcknowledgementType.received) : Message

A Command is a request from one side of the peer connection that some action be performed by the other side of the peer connection. The peer can either respond by acknowledging the command when it is received or when it is finished executing. The peer may also respond with an error

Parameters

data

Data payload of the command.

tag

A string which identifies the content type of the Command.

category

A user-defined Int which can be used to define the type of command

Constructors

Link copied to clipboard
fun Command(    data: IMessageBufferReader,     tag: String,     category: Int,     acknowledgeOn: Byte = CommandAcknowledgementType.received)

Construct a Command.

Properties

Link copied to clipboard
val acknowledgeOn: Byte

A byte flag from the CommandAcknowledgementType enum which identifies when the receiving client should send the CommandAcknowledgement for the Command. Defaults to CommandAcknowledgementType.received.

Link copied to clipboard
val category: Int

A user-defined integer which helps identify the function of the Message.

Link copied to clipboard
val data: IMessageBufferReader

A data payload in the Message.

Link copied to clipboard
val id: String

Unique identifier for the Message

Link copied to clipboard
val tag: String

A string which identifies the content type of the Message.

Link copied to clipboard
open override val type: Byte

Byte which identifies the contained data as command