sttp.ws.testing

Type members

Classlikes

class WebSocketStub[S](initialResponses: List[Try[WebSocketFrame]], initialState: S, makeNewResponses: (S, WebSocketFrame) => (S, List[Try[WebSocketFrame]]))

A stub for websockets that uses a queue of frames which are returned when the client calls WebSocket.receive.

A stub for websockets that uses a queue of frames which are returned when the client calls WebSocket.receive.

New messages can be added to queue in reaction to WebSocket.send being invoked, by specifying the behavior using one of the thenRespond variants.

For more complex cases, please provide your own implementation of WebSocket.

Companion
object
Companion
class