Packages

object WebSocket

Helper utilities to generate WebSocket results.

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

Type Members

  1. type HandlerProps = (ActorRef) => Props

    A function that, given an actor to send upstream messages to, returns actor props to create an actor to handle the WebSocket

  2. trait MessageFlowTransformer[+In, -Out] extends AnyRef

    Transforms WebSocket message flows into message flows of another type.

    Transforms WebSocket message flows into message flows of another type.

    The transformation may be more than just converting from one message to another, it may also produce messages, such as close messages with an appropriate error code if the message can't be consumed.

Value Members

  1. def accept[In, Out](f: (RequestHeader) => Flow[In, Out, _])(implicit transformer: MessageFlowTransformer[In, Out]): WebSocket

    Accepts a WebSocket using the given flow.

  2. def acceptOrResult[In, Out](f: (RequestHeader) => Future[Either[Result, Flow[In, Out, _]]])(implicit transformer: MessageFlowTransformer[In, Out]): WebSocket

    Creates an action that will either accept the websocket, using the given flow to handle the in and out stream, or return a result to reject the Websocket.

  3. def apply(f: (RequestHeader) => Future[Either[Result, Flow[Message, Message, _]]]): WebSocket
  4. object MessageFlowTransformer