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
@@ -10,11 +10,11 @@ MQTT (Message Queuing Telemetry Transport) is a lightweight messaging protocol t
10
10
11
11
## Usage
12
12
13
-
Create a client and connect to the MQTT broker.
13
+
Create a client and connect to the MQTT broker.
14
14
15
15
```swift
16
16
let client =MQTTClient(
17
-
host: "mqtt.eclipse.org",
17
+
host: "mqtt.eclipse.org",
18
18
port: 1883,
19
19
identifier: "My Client",
20
20
eventLoopGroupProvider: .createNew
@@ -81,7 +81,7 @@ doStuff()
81
81
```
82
82
83
83
### PUBLISH listener AsyncSequence
84
-
If you don't want to parse incoming PUBLISH packets via a callback the Swift concurrency support also includes an `AsyncSequence` for this purpose.
84
+
If you don't want to parse incoming PUBLISH packets via a callback the Swift concurrency support also includes an `AsyncSequence` for this purpose.
85
85
```swift
86
86
let listener = client.createPublishListener()
87
87
forawait result in listener {
@@ -124,7 +124,7 @@ MQTT also supports Web Socket connections. Set `Configuration.useWebSockets` to
124
124
125
125
## NIO Transport Services
126
126
127
-
On macOS and iOS you can use the NIO Transport Services library (NIOTS) and Apple's `Network.framework` for communication with the MQTT broker. If you don't provide an `eventLoopGroup` or a `TLSConfigurationType` then this is the default for both platforms. If you do provide either of these then the library will base it's decision on whether to use NIOTS or NIOSSL on what you provide. Provide a `MultiThreadedEventLoopGroup` or `NIOSSL.TLSConfiguration` and the client will use NIOSSL. Provide a `NIOTSEventLoopGroup` or `TSTLSConfiguration` and the client will use NIOTS. If you provide a `MultiThreadedEventLoopGroup` and a `TSTLSConfiguration` then the client will throw an error. If you are running on iOS you should always choose NIOTS.
127
+
On macOS and iOS you can use the NIO Transport Services library (NIOTS) and Apple's `Network.framework` for communication with the MQTT broker. If you don't provide an `eventLoopGroup` or a `TLSConfigurationType` then this is the default for both platforms. If you do provide either of these then the library will base it's decision on whether to use NIOTS or NIOSSL on what you provide. Provide a `MultiThreadedEventLoopGroup` or `NIOSSL.TLSConfiguration` and the client will use NIOSSL. Provide a `NIOTSEventLoopGroup` or `TSTLSConfiguration` and the client will use NIOTS. If you provide a `MultiThreadedEventLoopGroup` and a `TSTLSConfiguration` then the client will throw an error. If you are running on iOS you should always choose NIOTS.
128
128
129
129
## AWS IoT
130
130
@@ -137,15 +137,15 @@ import SotoSignerV4
137
137
let host ="MY_AWS_IOT_ENDPOINT.iot.eu-west-1.amazonaws.com"
@@ -175,9 +175,9 @@ You can then use the same functions available to the v3.1.1 client but there are
175
175
176
176
```swift
177
177
let futureResponse = client.v5.publish(
178
-
to: "JSONTest",
179
-
payload: payload,
180
-
qos: .atLeastOnce,
178
+
to: "JSONTest",
179
+
payload: payload,
180
+
qos: .atLeastOnce,
181
181
properties: [.contentType("application/json")]
182
182
)
183
183
```
@@ -186,4 +186,5 @@ Whoever subscribes to the "JSONTest" topic with a v5.0 client will also receive
186
186
187
187
## Documentation
188
188
189
-
You can find reference documentation for MQTTNIO [here](https://adam-fowler.github.io/mqtt-nio/). There is also a sample demonstrating using MQTTNIO within an iOS app found [here](https://github.com/adam-fowler/EmCuTeeTee)
189
+
You can find reference documentation for MQTTNIO
190
+
[here](https://swift-server-community.github.io/mqtt-nio/). There is also a sample demonstrating using MQTTNIO within an iOS app found [here](https://github.com/adam-fowler/EmCuTeeTee)
0 commit comments