mirror of https://github.com/vapor/docs.git
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:
parent
342ae636ac
commit
b6a8f3a755
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue