Update documentation about ws.send(...) return value (#968)

## Description

The current documentation incorrectly states that ws.send(...) returns a
value which can be awaited. However, the WebSocket.send method does not
have a return value.

## Reference

*
[vapor/websocket-kit/Sources/WebSocketKit/Concurrency](https://github.com/vapor/websocket-kit/blob/main/Sources/WebSocketKit/Concurrency/WebSocket%2BConcurrency.swift)
This commit is contained in:
Jia-Han Wu 2024-03-29 21:16:56 +08:00 committed by GitHub
parent 342ae636ac
commit b6a8f3a755
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 3 deletions

View File

@ -58,11 +58,10 @@ promise.futureResult.whenComplete { result in
}
```
If using `async`/`await` you can `await` on the result
If using `async`/`await` you can use `await` to wait for the asynchronous operation to complete
```swift
// TODO Check this actually works
let result = try await ws.send(...)
try await ws.send(...)
```
### Receiving