Module: vertx/sockjs

vertx/sockjs

SockJS enables browsers to communicate with the server using a simple WebSocket-like api for sending and receiving messages. Under the hood SockJS chooses to use one of several protocols depending on browser capabilities and what apppears 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.

Source:

Classes

SockJSServer
SockJSSocket

Methods

<static> createSockJSServer(httpServer) → {module:vertx/sockjs.SockJSServer}

Create a new SockJSServer
Parameters:
Name Type Description
httpServer module:vertx/http.HttpServer the HTTP server to use
Source:
Returns:
the SockJS server instance
Type
module:vertx/sockjs.SockJSServer