-
Notifications
You must be signed in to change notification settings - Fork 425
CocoaMQTT5Message
leeway edited this page Nov 19, 2021
·
1 revision
MQTT Message
public class CocoaMQTT5Message: NSObject
NSObject
public init(topic: String, string: String, qos: CocoaMQTTQoS = .qos1, retained: Bool = false)
public init(topic: String, payload: [UInt8], qos: CocoaMQTTQoS = .qos1, retained: Bool = false)
public var qos = CocoaMQTTQoS.qos1
public var topic: String
public var payload: [UInt8]
public var retained = false
The duplicated
property show that this message maybe has be received before
public var duplicated = false
3.1.3.2.3 Payload Format Indicator
public var isUTF8EncodedData: Bool = true
3.1.3.2.2 Will Delay Interval
public var willDelayInterval: UInt32? = 0
3.1.3.2.4 Message Expiry Interval
public var willExpiryInterval: UInt32? = 0
3.1.3.2.5 Content Type
public var contentType: String?
3.1.3.2.6 Response Topic
public var willResponseTopic: String?
3.1.3.2.7 Correlation Data
public var willCorrelationData: [UInt8]?
3.1.3.2.8 User Property
public var willUserProperty: [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
public var properties: [UInt8]
public override var description: String
Types
- CloseCode
- CocoaMQTT
- CocoaMQTT5
- CocoaMQTT5Message
- CocoaMQTTAUTHReasonCode
- CocoaMQTTCONNACKReasonCode
- CocoaMQTTConnAck
- CocoaMQTTConnState
- CocoaMQTTDISCONNECTReasonCode
- CocoaMQTTError
- CocoaMQTTError.FoundationConnection
- CocoaMQTTLogger
- CocoaMQTTLoggerLevel
- CocoaMQTTMessage
- CocoaMQTTPUBACKReasonCode
- CocoaMQTTPUBCOMPReasonCode
- CocoaMQTTPUBRECReasonCode
- CocoaMQTTPUBRELReasonCode
- CocoaMQTTPropertyName
- CocoaMQTTQoS
- CocoaMQTTSUBACKReasonCode
- CocoaMQTTSocket
- CocoaMQTTUNSUBACKReasonCode
- CocoaMQTTWebSocket
- CocoaMQTTWebSocket.DefaultConnectionBuilder
- CocoaMQTTWebSocket.FoundationConnection
- CocoaMQTTWebSocket.StarscreamConnection
- CocoaRetainHandlingOption
- ErrorType
- FoundationStream
- MqttAuthProperties
- MqttConnectProperties
- MqttDecodeConnAck
- MqttDecodePubAck
- MqttDecodePubComp
- MqttDecodePubRec
- MqttDecodePubRel
- MqttDecodePublish
- MqttDecodeSubAck
- MqttDecodeUnsubAck
- MqttPublishProperties
- MqttSubscription
- PayloadFormatIndicator
- SSLCert
- SSLClientCertificate
- SSLClientCertificateError
- SSLSecurity
- SSLSettings
- WSError
- WebSocket
- WebSocket.OpCode
- WebSocket.WSResponse
- formatInt
Protocols
- CocoaMQTT5Delegate
- CocoaMQTTDelegate
- CocoaMQTTSocketDelegate
- CocoaMQTTSocketProtocol
- CocoaMQTTWebSocketConnection
- CocoaMQTTWebSocketConnectionBuilder
- CocoaMQTTWebSocketConnectionDelegate
- SSLTrustValidator
- WSStream
- WSStreamDelegate
- WebSocketAdvancedDelegate
- WebSocketClient
- WebSocketDelegate
- WebSocketPongDelegate