Skip to content

Commit dd46d10

Browse files
authored
Update README.md
1 parent 1b0d4d9 commit dd46d10

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,14 @@ let wsClient = ObservableWebSocketClient(
8787
}
8888
)
8989
```
90+
91+
### Sending messages
92+
After the client is initialized and a connection is established, messages can be sent via the `ObservableWebSocketClient.sendMessage(_:)` API:
93+
94+
```swift
95+
wsClient.sendMessage("A String WebSocket message")
96+
```
97+
9098
## Demo
9199
In this demo app, the `ObservableWebSocketClient` connects to a [Kucoin WebSocket server](https://www.kucoin.com/docs/websocket/introduction) and sends `ping` messages every `pingTimerInterval` to keep the connection alive. The server responds with `welcome` and `pong` messages:
92100

0 commit comments

Comments
 (0)