Skip to content

Commit 03abf4e

Browse files
committed
Correct documentation
1 parent 9b589fe commit 03abf4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ wsClient
6363
### Ping/Pong 🏓
6464

6565
#### Ping Message
66-
Passing in a `pingTimerInterval` will cause a timer to continuously send the given `pingMessage` to the WS server, keeping the connection alive:
66+
Passing in a `pingTimerInterval` during the client initialization will cause a timer to continuously send the given `pingMessage` to the WS server, keeping the connection alive:
6767

6868
```swift
6969
let websocketURL = URL(string: "wss://endpoint.com")!
@@ -75,7 +75,7 @@ let wsClient = ObservableWebSocketClient(
7575
```
7676

7777
#### Ping Message with Generated ID
78-
To generate a unique ID for the ping-type message, use the closure in `pingMessageWithGenerateId`. The closure takes a `String` (the generated unique ID), returns its modified version incorporating that ID, and sends the message to the WS server. As in the above, these steps are repeated continuously, generating unique IDs each time to keep the connection alive:
78+
To generate a unique ID for the ping-type message, use the closure in `pingMessageWithGenerateId`. The closure takes a `String` (the generated unique ID), returns a modified version of the message incorporating the ID, and sends it to the WS server. As in the above, these steps are repeated continuously using the interval indicated in the `pingTimerInterval`, generating unique IDs each time to keep the connection alive:
7979

8080
```swift
8181
let websocketURL = URL(string: "wss://endpoint.com")!

0 commit comments

Comments
 (0)