Documentation
Everything you need to get started with SOCKJS and build real-time applications.
Quick Start
Get up and running in under 5 minutes
1. Install via CDN
<script src="https://cdn.jsdelivr.net/npm/sockjs-client@1/dist/sockjs.min.js"></script>
2. Or via npm
npm install sockjs-client
3. Connect to server
const sock = new SockJS('http://localhost:9999/echo');
sock.onopen = () => console.log('Connected');
sock.onmessage = (e) => console.log('Received:', e.data);
Documentation
Getting Started
Installation, basic setup, and first connection
- Installation
- Basic Usage
- Configuration
- Browser Support
API Reference
Complete client and server API documentation
- Client API
- Server API
- Events
- Error Handling
Protocols
Understanding transport protocols and fallbacks
- WebSocket
- HTTP Streaming
- HTTP Polling
- EventSource
Server Setup
Configure and deploy SOCKJS servers
- Node.js Server
- Python Server
- Java Server
- Go Server
Advanced Topics
Scaling, security, and performance optimization
- Load Balancing
- Security
- Performance
- Debugging
Can't find what you're looking for?
Search our documentation or ask the community