sttp.client4.ws

package sttp.client4.ws

Members list

Type members

Classlikes

class GotAWebSocketException() extends Exception

Attributes

Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
class NotAWebSocketException(statusCode: StatusCode) extends Exception

Attributes

Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
class SyncWebSocket(val delegate: WebSocket[Identity])

Allows interacting with a web socket. Interactions can happen:

Allows interacting with a web socket. Interactions can happen:

  • on the frame level, by sending and receiving raw WebSocketFrame s
  • using the provided receive* methods to obtain concatenated data frames, or string/byte payloads, and the send* method to send string/binary frames.

The send* and receive* methods may result in a failed effect, with either one of sttp.ws.WebSocketException exceptions, or a backend-specific exception. Specifically, they will fail with WebSocketClosed if the web socket is closed.

See the either and eitherClose method to lift web socket closed events to the value level.

Attributes

Supertypes
class Object
trait Matchable
class Any
object async extends SttpWebSocketAsyncApi

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
async.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
stream.type
object sync extends SttpWebSocketSyncApi

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
sync.type