Skip to content

Commit

Permalink
Merge pull request #874 from leedgdev/patch-2
Browse files Browse the repository at this point in the history
Update websockets.md with websocket compression description.
  • Loading branch information
adamw authored Feb 23, 2021
2 parents faf9a90 + b5e852b commit 293ff1c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/websockets.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ One of the optional capabilities (represented as `WebSockets`) that a backend ca

A websocket request will be sent instead of a regular one if the response specification includes handling the response as a websocket. A number of `asWebSocket(...)` methods are available, giving a couple of variants of working with websockets.

For those who plan to use a lot of websocket traffic, You should use consider websocket compression. As Of 2020-Feb-23, Only async-client-backend and okhttp backend support websocket compression.

## Using `WebSocket`

The first possibility is using `sttp.client3.ws.WebSocket[F]`, where `F` is the backend-specific effects wrapper, such as `Future` or `IO`. It contains two basic methods, both of which use the `F` effect to return results:
Expand Down

0 comments on commit 293ff1c

Please sign in to comment.