SockJS is a browser JavaScript library that provides a WebSocket-like object. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server. Under the hood SockJS tries to use native WebSockets first. If that fails it can use a variety of browser-specific transport protocols and presents them through WebSocket-like abstractions. SockJS is intended to work for all modern browsers and in environments which don't support the WebSocket protocol, for example, behind restrictive corporate proxies. SockJS-client does require a server counterpart, such as SockJS-node, which is a SockJS server for Node.js. The API should follow HTML5 Websockets API as closely as possible. All the transports must support cross domain connections out of the box. It's possible and recommended to host a SockJS server on a different server than your main web site.

Features

  • SockJS mimics the WebSockets API
  • After the script is loaded you can establish a connection with the SockJS server
  • Similar to the 'WebSocket' API, the 'SockJS' constructor takes one, or more arguments
  • Allows you to supply a list transports that may be used by SockJS
  • Both client and server use session identifiers to distinguish connections
  • Specify a minimum timeout in milliseconds to use for the transport connections
  • You can connect any WebSocket RFC 6455 compliant WebSocket client

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow SockJS-client

SockJS-client Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of SockJS-client!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Emulators, JavaScript WebSocket Libraries

Registered

2021-07-23