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

CocoaMQTT5Message

MQTT Message

public class CocoaMQTT5Message: 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

isUTF8EncodedData

3.1.3.2.3 Payload Format Indicator

public var isUTF8EncodedData: Bool = true

willDelayInterval

3.1.3.2.2 Will Delay Interval

public var willDelayInterval: UInt32? = 0

willExpiryInterval

3.1.3.2.4 Message Expiry Interval

public var willExpiryInterval: UInt32? = 0

contentType

3.1.3.2.5 Content Type

public var contentType: String?

willResponseTopic

3.1.3.2.6 Response Topic

public var willResponseTopic: String?

willCorrelationData

3.1.3.2.7 Correlation Data

public var willCorrelationData: [UInt8]?

willUserProperty

3.1.3.2.8 User Property

public var willUserProperty: [String: String]?

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

properties

public var properties: [UInt8] 

description

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