Skip to content
leeway edited this page Nov 19, 2021 · 1 revision

CocoaMQTTMessage

MQTT Message

public class CocoaMQTTMessage: NSObject 

Inheritance

NSObject

Initializers

init(topic:string:qos:retained:)

public init(topic: String, string: String, qos: CocoaMQTTQoS = .qos1, retained: Bool = false) 

init(topic:payload:qos:retained:)

public init(topic: String, payload: [UInt8], qos: CocoaMQTTQoS = .qos1, retained: Bool = false) 

Properties

qos

public var qos = CocoaMQTTQoS.qos1

topic

public var topic: String

payload

public var payload: [UInt8]

retained

public var retained = false

duplicated

The duplicated property show that this message maybe has be received before

public var duplicated = false

string

Return the payload as a utf8 string if possible

public var string: String? 

It will return nil if the payload is not a valid utf8 string

description

public override var description: String 
Types
Protocols
Global Variables
Clone this wiki locally