Message
struct Message : Codable, Identifiable
Message objects are the objects sent between devices.
We fill in the message struct and send it off formatted as JSON.
-
Some id which uniquely identifies the message.
Declaration
Swift
var id: Int32
-
Some type of message. 0: A normal message 1: An ACK message 2: A READ message
Declaration
Swift
var type: Int
-
The author who wrote the message.
Declaration
Swift
var sender: String
-
Who the message is meant for
Declaration
Swift
var receiver: String
-
The actual content of the message.
Declaration
Swift
var text: String