Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
benzwreck committed Jul 17, 2023
1 parent 5060120 commit 343295d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ private[client4] abstract class WebSocketImpl[F[_]](
}

override def send(f: WebSocketFrame, isContinuation: Boolean = false): F[Unit] =
// ws.send* is not thread-safe - at least one can run at a time. Hence, adding a sequencer to ensure that
// even if called concurrently, these will be run in sequence.
monad.suspend {
f match {
case WebSocketFrame.Text(payload, finalFragment, _) =>
Expand Down Expand Up @@ -89,6 +87,8 @@ private[client4] object WebSocketImpl {
): WebSocketImpl[F] = new WebSocketImpl[F](ws, queue, _isOpen) {
override implicit def monad: MonadError[F] = _monad

// ws.send* is not thread-safe - at least one can run at a time. Hence, adding a sequencer to ensure that
// even if called concurrently, these will be run in sequence.
override def send(f: WebSocketFrame, isContinuation: Boolean): F[Unit] = sequencer(super.send(f, isContinuation))

override protected[client4] def fromCompletableFuture(cf: CompletableFuture[JWebSocket]): F[Unit] =
Expand Down
4 changes: 2 additions & 2 deletions docs/backends/summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ Below is a summary of all the JVM backends; see the sections on individual backe
==================================== ================================ ================================================= ========================== ===================
Class Effect type Supported stream type Supports websockets Fully non-blocking
==================================== ================================ ================================================= ========================== ===================
``DefaultSyncBackend`` None (``Identity``) n/a no no
``HttpClientSyncBackend`` None (``Identity``) n/a no no
``DefaultSyncBackend`` None (``Identity``) n/a yes (regular) no
``HttpClientSyncBackend`` None (``Identity``) n/a yes (regular) no
``DefaultFutureBackend`` ``scala.concurrent.Future`` n/a yes (regular) no
``HttpClientFutureBackend`` ``scala.concurrent.Future`` n/a yes (regular) no
``HttpClientMonixBackend`` ``monix.eval.Task`` ``monix.reactive.Observable[ByteBuffer]`` yes (regular & streaming) yes
Expand Down
2 changes: 1 addition & 1 deletion docs/backends/synchronous.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ Synchronous backends don't support non-blocking [streaming](../requests/streamin

## Websockets

Only the OkHttp backend supports regular [websockets](../websockets.md).
Both HttpClient and OkHttp backends support regular [websockets](../websockets.md).

0 comments on commit 343295d

Please sign in to comment.