Trait

sttp.ws

WebSocket

Related Doc: package ws

Permalink

trait WebSocket[F[_]] extends AnyRef

The send and receive methods may result in a failed effect, with either one of WebSocketException exceptions, or a backend-specific exception.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. WebSocket
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def isOpen(): F[Boolean]

    Permalink
  2. implicit abstract def monad: MonadError[F]

    Permalink
  3. abstract def receive(): F[WebSocketFrame]

    Permalink

    After receiving a close frame, no further interactions with the web socket should happen.

    After receiving a close frame, no further interactions with the web socket should happen. Subsequent invocations of receive, as well as send, will fail with the WebSocketClosed exception.

  4. abstract def send(f: WebSocketFrame, isContinuation: Boolean = false): F[Unit]

    Permalink
  5. abstract def upgradeHeaders: Headers

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. def close(): F[Unit]

    Permalink

    Idempotent when used sequentially.

  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  15. def receiveBinary(pongOnPing: Boolean): F[Either[Close, Array[Byte]]]

    Permalink

    Receive a single binary message (which might come from multiple, fragmented frames).

    Receive a single binary message (which might come from multiple, fragmented frames). Ignores non-binary frames and returns combined results.

    pongOnPing

    Should a WebSocketFrame.Pong be sent when a WebSocketFrame.Ping is received.

  16. def receiveBinaryFrame(pongOnPing: Boolean = true): F[Either[Close, Binary]]

    Permalink

    Receive a single binary data frame, ignoring others.

    Receive a single binary data frame, ignoring others. The frame might be a fragment. To receive whole messages, use receiveBinary.

    pongOnPing

    Should a WebSocketFrame.Pong be sent when a WebSocketFrame.Ping is received.

  17. def receiveDataFrame(pongOnPing: Boolean = true): F[Either[Close, Data[_]]]

    Permalink

    Receive a single data frame, ignoring others.

    Receive a single data frame, ignoring others. The frame might be a fragment.

    pongOnPing

    Should a WebSocketFrame.Pong be sent when a WebSocketFrame.Ping is received.

  18. def receiveText(pongOnPing: Boolean = true): F[Either[Close, String]]

    Permalink

    Receive a single text message (which might come from multiple, fragmented frames).

    Receive a single text message (which might come from multiple, fragmented frames). Ignores non-text frames and returns combined results.

    pongOnPing

    Should a WebSocketFrame.Pong be sent when a WebSocketFrame.Ping is received.

  19. def receiveTextFrame(pongOnPing: Boolean = true): F[Either[Close, Text]]

    Permalink

    Receive a single text data frame, ignoring others.

    Receive a single text data frame, ignoring others. The frame might be a fragment. To receive whole messages, use receiveText.

    pongOnPing

    Should a WebSocketFrame.Pong be sent when a WebSocketFrame.Ping is received.

  20. def sendBinary(payload: Array[Byte]): F[Unit]

    Permalink
  21. def sendText(payload: String): F[Unit]

    Permalink
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  23. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped