sttp.client4.ws
package sttp.client4.ws
Members list
Type members
Classlikes
class GotAWebSocketException() extends Exception
Attributes
- Supertypes
-
class Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
class NotAWebSocketException(statusCode: StatusCode) extends Exception
Attributes
- Supertypes
-
class Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
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 thesend*
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 Objecttrait Matchableclass Any
object async extends SttpWebSocketAsyncApi
Attributes
- Supertypes
- Self type
-
async.type
object stream extends SttpWebSocketStreamApi
Attributes
- Supertypes
- Self type
-
stream.type
object sync extends SttpWebSocketSyncApi
Attributes
- Supertypes
- Self type
-
sync.type
In this article