WebSocket

tyrian.websocket.WebSocket
See theWebSocket companion object
final class WebSocket[F[_]](liveSocket: LiveSocket[F])(implicit evidence$1: Async[F])

Helper WebSocket instance to store in your model that acts as a controller

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def disconnect[Msg]: Cmd[F, Msg]

Disconnect from this WebSocket

Disconnect from this WebSocket

Attributes

def publish[Msg](message: String): Cmd[F, Msg]

Publish a message to this WebSocket

Publish a message to this WebSocket

Attributes

def subscribe[Msg](f: WebSocketEvent => Msg): Sub[F, Msg]

Subscribe to messages from this WebSocket

Subscribe to messages from this WebSocket

Attributes