Package

play

socketio

Permalink

package socketio

Visibility
  1. Public
  2. All

Type Members

  1. case class SocketIOConfig(ackDeadline: FiniteDuration = 60.seconds, ackCleanupEvery: Int = 10) extends Product with Serializable

    Permalink

    Configuration for socket.io.

    Configuration for socket.io.

    See reference.conf for in depth documentation.

  2. class SocketIOConfigProvider extends Provider[SocketIOConfig]

    Permalink
    Annotations
    @Singleton()
  3. case class SocketIOEvent(name: String, arguments: Seq[Either[JsValue, ByteString]], ack: Option[SocketIOEventAck]) extends Product with Serializable

    Permalink

    A socket.io event.

    A socket.io event.

    A socket.io event consists of a name (which is used on the client side to register handlers for events), and a set of arguments associated with that event.

    The arguments mirror the structure in JavaScript, when you publish an event, you pass the event name, and then several arguments. When you subscribe to an event, you declare a function that takes zero or more arguments. Consequently, the arguments get modelled as a sequence.

    Furthermore, socket.io allows you to pass either a structure that can be serialized to JSON (in the Play world, this is a JsValue), or a binary argument (in the Play world, this is a ByteString). Hence, each argument is Either[JsValue, ByteString].

    Finally, as the last argument, socket.io allows the emitter to pass an ack function. This then gets passed to the consumer as the last argument to their callback function, and they can invoke it, and the arguments passed to it will be serialized to the wire, and passed to the function registered on the other side.

    name

    The name of the event.

    arguments

    The list of arguments.

    ack

    An optional ack function.

  4. trait SocketIOEventAck extends AnyRef

    Permalink
  5. class SocketIOModule extends Module

    Permalink

    Module for providing both scaladsl and javadsl socket.io components to Play's runtime dependency injection system.

  6. case class SocketIOSession[+T](sid: String, data: T) extends Product with Serializable

    Permalink

    A socket.io session.

    A socket.io session.

    The socket.io session object holds any information relevant to the session. A user can define data to be stored there, such as authentication data, and then use that when connecting to namespaces.

    sid

    The session ID.

    data

    The session data.

  7. abstract class SocketIOSessionException extends RuntimeException

    Permalink

    Base class for all exceptions related to the socket.io session.

Value Members

  1. object SocketIOConfig extends Serializable

    Permalink
  2. object SocketIOEvent extends Serializable

    Permalink
  3. object SocketIOSessionException extends Serializable

    Permalink
  4. object SocketIOSessionFlow

    Permalink

    Utility to handle engine.io sessions as socket.io sessions.

  5. package javadsl

    Permalink
  6. package protocol

    Permalink
  7. package scaladsl

    Permalink

Ungrouped