You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returntryawaitwithUnsafeThrowingContinuation{ cont in
30
-
shutdown(queue: queue){ error in
30
+
self.shutdown(queue: queue){ error in
31
31
iflet error = error {
32
32
cont.resume(throwing: error)
33
33
}else{
@@ -39,15 +39,16 @@ extension MQTTClient {
39
39
40
40
/// Connect to MQTT server
41
41
///
42
-
/// Completes when CONNACK is received
43
-
///
44
-
/// If `cleanSession` is set to false the Server MUST resume communications with the Client based on state from the current Session (as identified by the Client identifier).
45
-
/// If there is no Session associated with the Client identifier the Server MUST create a new Session. The Client and Server MUST store the Session
46
-
/// after the Client and Server are disconnected. If set to true then the Client and Server MUST discard any previous Session and start a new one
42
+
/// If `cleanSession` is set to false the Server MUST resume communications with the Client based on
43
+
/// state from the current Session (as identified by the Client identifier). If there is no Session
44
+
/// associated with the Client identifier the Server MUST create a new Session. The Client and Server
45
+
/// MUST store the Session after the Client and Server are disconnected. If set to true then the Client
46
+
/// and Server MUST discard any previous Session and start a new one
47
47
///
48
48
/// - Parameters:
49
49
/// - cleanSession: should we start with a new session
50
50
/// - will: Publish message to be posted as soon as connection is made
51
+
/// - Returns: EventLoopFuture to be updated with whether server holds a session for this client
51
52
/// - Returns: Whether server held a session for this client and has restored it.
Copy file name to clipboardExpand all lines: Sources/MQTTNIO/AsyncAwaitSupport/MQTTClientV5+async.swift
+39-4Lines changed: 39 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -18,9 +18,11 @@ import NIOCore
18
18
extensionMQTTClient.V5{
19
19
/// Connect to MQTT server
20
20
///
21
-
/// If `cleanStart` is set to false the Server MUST resume communications with the Client based on state from the current Session (as identified by the Client identifier).
22
-
/// If there is no Session associated with the Client identifier the Server MUST create a new Session. The Client and Server MUST store the Session
23
-
/// after the Client and Server are disconnected. If set to true then the Client and Server MUST discard any previous Session and start a new one
21
+
/// If `cleanStart` is set to false the Server MUST resume communications with the Client based on
22
+
/// state from the current Session (as identified by the Client identifier). If there is no Session
23
+
/// associated with the Client identifier the Server MUST create a new Session. The Client and Server
24
+
/// MUST store the Session after the Client and Server are disconnected. If set to true then the
25
+
/// Client and Server MUST discard any previous Session and start a new one
24
26
///
25
27
/// The function returns an EventLoopFuture which will be updated with whether the server has restored a session for this client.
26
28
///
@@ -29,7 +31,7 @@ extension MQTTClient.V5 {
29
31
/// - properties: properties to attach to connect message
30
32
/// - will: Publish message to be posted as soon as connection is made
31
33
/// - authWorkflow: The authentication workflow. This is currently unimplemented.
32
-
/// - Returns: EventLoopFuture to be updated with connack
Copy file name to clipboardExpand all lines: Sources/MQTTNIO/MQTTClient.swift
+36-6Lines changed: 36 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -242,9 +242,11 @@ public final class MQTTClient {
242
242
243
243
/// Connect to MQTT server
244
244
///
245
-
/// If `cleanSession` is set to false the Server MUST resume communications with the Client based on state from the current Session (as identified by the Client identifier).
246
-
/// If there is no Session associated with the Client identifier the Server MUST create a new Session. The Client and Server MUST store the Session
247
-
/// after the Client and Server are disconnected. If set to true then the Client and Server MUST discard any previous Session and start a new one
245
+
/// If `cleanSession` is set to false the Server MUST resume communications with the Client based on
246
+
/// state from the current Session (as identified by the Client identifier). If there is no Session
247
+
/// associated with the Client identifier the Server MUST create a new Session. The Client and Server
248
+
/// MUST store the Session after the Client and Server are disconnected. If set to true then the Client
249
+
/// and Server MUST discard any previous Session and start a new one
248
250
///
249
251
/// The function returns an EventLoopFuture which will be updated with whether the server has restored a session for this client.
250
252
///
@@ -255,6 +257,33 @@ public final class MQTTClient {
Copy file name to clipboardExpand all lines: Sources/MQTTNIO/MQTTClientV5.swift
+44-8Lines changed: 44 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -20,9 +20,11 @@ extension MQTTClient {
20
20
21
21
/// Connect to MQTT server
22
22
///
23
-
/// If `cleanStart` is set to false the Server MUST resume communications with the Client based on state from the current Session (as identified by the Client identifier).
24
-
/// If there is no Session associated with the Client identifier the Server MUST create a new Session. The Client and Server MUST store the Session
25
-
/// after the Client and Server are disconnected. If set to true then the Client and Server MUST discard any previous Session and start a new one
23
+
/// If `cleanStart` is set to false the Server MUST resume communications with the Client based on
24
+
/// state from the current Session (as identified by the Client identifier). If there is no Session
25
+
/// associated with the Client identifier the Server MUST create a new Session. The Client and Server
26
+
/// MUST store the Session after the Client and Server are disconnected. If set to true then the
27
+
/// Client and Server MUST discard any previous Session and start a new one
26
28
///
27
29
/// The function returns an EventLoopFuture which will be updated with whether the server has restored a session for this client.
0 commit comments