Message

abstract class Message(    val data: IMessageBufferReader,     val tag: String,     val category: Int)

Message is an abstract class that represents a unit of communication between two connected peers. It wraps the user-defined payload for delivery between connected peers.

It is made up of three core components:

  • Data: The client specific payload being delivered.

  • Tag: The type of data being transmitted. Mime type usage is encouraged, but not required.

  • Category: A user-defined numeric that provides information about the message; it can be used to provide processing information without deserializing the payload

Constructors

Link copied to clipboard
fun Message(    data: IMessageBufferReader,     tag: String,     category: Int)

Construct a new

Properties

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
abstract val type: Byte

Byte defined in each wrapper class which identifies the type of message

Inheritors

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