Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Apr 25, 2024 via pnpm

sockjs 0.3.24

SockJS-node is a server counterpart of SockJS-client a JavaScript library that provides a WebSocket-like object in the browser. SockJS gives you a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication
Package summary
Share
0
issues
2
licenses
4
MIT
3
Apache-2.0
Package created
11 Aug 2011
Version published
3 Dec 2021
Maintainers
6
Total deps
7
Direct deps
3
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
4 Packages, Including:
http-parser-js@0.5.8
safe-buffer@5.2.1
sockjs@0.3.24
uuid@8.3.2

Apache License 2.0

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
3 Packages, Including:
faye-websocket@0.11.4
websocket-driver@0.7.4
websocket-extensions@0.1.4
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of sockjs 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
faye-websocket0.11.49.56 kBApache-2.0
prod
uuid8.3.227.32 kBMIT
prod
websocket-driver0.7.418.75 kBApache-2.0
prod

Visualizations

Frequently Asked Questions

What does sockjs do?

SockJS is a popular JavaScript library that offers a WebSocket-like API. Its main goal is to facilitate low latency, full duplex, cross-domain communication channels between the web browser and the server, irrespective of whether there's native WebSocket support. It serves as a bridge that enables web applications to interact seamlessly, even in environments where certain web technologies are not supported, making it an essential tool for real-time web applications. Using SockJS ensures that developers have a consistent API to work with, which aids in the compatibility of the software across multiple browsers and environments.

How do you use sockjs?

To utilize SockJS in a Node.js server environment, you would need to install the SockJS-node counterpart. This can be done using the following NPM command:

npm install sockjs

After successfully installing the library, you can begin to use it in your application. A minimal echo server using SockJS could be implemented as follows:

var http = require('http');
var sockjs = require('sockjs');

var echo = sockjs.createServer();
echo.on('connection', function(conn) {
    conn.on('data', function(message) {
        conn.write(message);
    });
    conn.on('close', function() {});
});

var server = http.createServer();
echo.installHandlers(server, {prefix:'/echo'});
server.listen(9999, '0.0.0.0');

In this code snippet, an echo server is created, where each incoming message received on a connection is sent back ("echoed") to the sender. Here, the createServer() method creates an instance of the SockJS server, and installHandlers() function is used to handle the connection on a specific endpoint (/echo).

Where are the sockjs docs?

The comprehensive documentation for SockJS-node can be found in the SockJS-node Github repository. Developers can find various resources, including API details, examples, discussion on various issues, and design considerations, which can help them understand how to interact with the library more effectively.