Skip to content

Commit 53d307b

Browse files
authored
Fixed broken link to the reference documentation in README (#111)
1 parent c1d8a15 commit 53d307b

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MQTT NIO
1+
# MQTT NIO
22

33
[![sswg:sandbox|94x20](https://img.shields.io/badge/sswg-sandbox-lightgrey.svg)](https://github.com/swift-server/sswg/blob/master/process/incubation.md#sandbox-level)
44
[<img src="http://img.shields.io/badge/swift-5.5-brightgreen.svg" alt="Swift 5.5" />](https://swift.org)
@@ -10,11 +10,11 @@ MQTT (Message Queuing Telemetry Transport) is a lightweight messaging protocol t
1010

1111
## Usage
1212

13-
Create a client and connect to the MQTT broker.
13+
Create a client and connect to the MQTT broker.
1414

1515
```swift
1616
let client = MQTTClient(
17-
host: "mqtt.eclipse.org",
17+
host: "mqtt.eclipse.org",
1818
port: 1883,
1919
identifier: "My Client",
2020
eventLoopGroupProvider: .createNew
@@ -81,7 +81,7 @@ doStuff()
8181
```
8282

8383
### 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.
8585
```swift
8686
let listener = client.createPublishListener()
8787
for await result in listener {
@@ -124,7 +124,7 @@ MQTT also supports Web Socket connections. Set `Configuration.useWebSockets` to
124124

125125
## NIO Transport Services
126126

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.
128128

129129
## AWS IoT
130130

@@ -137,15 +137,15 @@ import SotoSignerV4
137137
let host = "MY_AWS_IOT_ENDPOINT.iot.eu-west-1.amazonaws.com"
138138
let headers = HTTPHeaders([("host", host)])
139139
let signer = AWSSigner(
140-
credentials: StaticCredential(accessKeyId: "MYACCESSKEY", secretAccessKey: "MYSECRETKEY"),
141-
name: "iotdata",
140+
credentials: StaticCredential(accessKeyId: "MYACCESSKEY", secretAccessKey: "MYSECRETKEY"),
141+
name: "iotdata",
142142
region: "eu-west-1"
143143
)
144144
let signedURL = signer.signURL(
145-
url: URL(string: "https://\(host)/mqtt")!,
146-
method: .GET,
147-
headers: headers,
148-
body: .none,
145+
url: URL(string: "https://\(host)/mqtt")!,
146+
method: .GET,
147+
headers: headers,
148+
body: .none,
149149
expires: .minutes(30)
150150
)
151151
let requestURI = "/mqtt?\(signedURL.query!)"
@@ -175,9 +175,9 @@ You can then use the same functions available to the v3.1.1 client but there are
175175

176176
```swift
177177
let futureResponse = client.v5.publish(
178-
to: "JSONTest",
179-
payload: payload,
180-
qos: .atLeastOnce,
178+
to: "JSONTest",
179+
payload: payload,
180+
qos: .atLeastOnce,
181181
properties: [.contentType("application/json")]
182182
)
183183
```
@@ -186,4 +186,5 @@ Whoever subscribes to the "JSONTest" topic with a v5.0 client will also receive
186186

187187
## Documentation
188188

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

Comments
 (0)