org.vertx.scala.core

sockjs

package sockjs

Visibility
  1. Public
  2. All

Type Members

  1. final class EventBusBridgeHook extends AnyVal

    A hook that you can use to receive various events on the EventBusBridge.

  2. final class SockJSServer extends Self

    This is an implementation of the server side part of SockJS.

    This is an implementation of the server side part of SockJS.

    SockJS enables browsers to communicate with the server using a simple WebSocket-like api for sending and receiving messages. Under the bonnet SockJS chooses to use one of several protocols depending on browser capabilities and what appears to be working across the network.

    Available protocols include:

    • WebSockets
    • xhr-polling
    • xhr-streaming
    • json-polling
    • event-source
    • html-file

    This means, it should just work irrespective of what browser is being used, and whether there are nasty things like proxies and load balancers between the client and the server.

    For more detailed information on SockJS, see their website.

    On the server side, you interact using instances of org.vertx.scala.core.sockjs.SockJSSocket - this allows you to send data to the client or receive data via the org.vertx.scala.core.sockjs.SockJSSocket.dataHandler().

    You can register multiple applications with the same SockJSServer, each using different path prefixes, each application will have its own handler, and configuration.

    Instances of this class are not thread-safe.

  3. final class SockJSSocket extends Self with ReadStream with WriteStream

    You interact with SockJS clients through instances of SockJS socket.

    You interact with SockJS clients through instances of SockJS socket.

    The API is very similar to org.vertx.scala.core.http.WebSocket. It implements both org.vertx.scala.core.streams.ReadStream and org.vertx.scala.core.streams.WriteStream so it can be used with org.vertx.scala.core.streams.Pump to pump data with flow control.

    Instances of this class are not thread-safe.

Value Members

  1. object EventBusBridgeHook

  2. object SockJSServer

    Factory for org.vertx.scala.core.sockjs.SockJSServer instances.

  3. object SockJSSocket

    Factory for org.vertx.scala.core.sockjs.SockJSSocket instances.

Ungrouped