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 30, 2024 via pnpm

sockjs-client 1.6.1

SockJS-client is a browser JavaScript library that provides a WebSocket-like object.
Package summary
Share
0
issues
3
licenses
9
MIT
3
Apache-2.0
1
ISC
Package created
23 Mar 2012
Version published
28 May 2022
Maintainers
2
Total deps
13
Direct deps
5
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
9 Packages, Including:
debug@3.2.7
eventsource@2.0.2
http-parser-js@0.5.8
ms@2.1.3
querystringify@2.2.0
requires-port@1.0.0
safe-buffer@5.2.1
sockjs-client@1.6.1
url-parse@1.5.10

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

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
inherits@2.0.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

5
All Dependencies CSV
β“˜ This is a list of sockjs-client 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
debug3.2.716.48 kBMIT
prod
eventsource2.0.280.84 kBMIT
prod
faye-websocket0.11.49.56 kBApache-2.0
prod
inherits2.0.41.98 kBISC
prod
url-parse1.5.1016.61 kBMIT
prod

Visualizations

Frequently Asked Questions

What does sockjs-client do?

SockJS-client is a promising and advanced browser JavaScript library that brings a WebSocket-like object to the table. Applying this crucial tool, developers can create a low latency, full-duplex, cross-domain communication channel between the web browser and server. It's designed with the intention to function flawlessly in all modern browsers, and even in environments that do not support the WebSocket protocol, notably behind restrictive corporate proxies.

How do you use sockjs-client?

Using SockJS-client is a straightforward process. You initiate by loading the SockJS JavaScript library in your HTML head:

<script src="https://cdn.jsdelivr.net/npm/sockjs-client@1/dist/sockjs.min.js"></script>

Once the script loads, you can establish a connection with the SockJS server. Here's an example exhibiting how to do so:

 var sock = new SockJS('https://mydomain.com/my_prefix');
 sock.onopen = function() {
     console.log('open');
     sock.send('test');
 };

 sock.onmessage = function(e) {
     console.log('message', e.data);
     sock.close();
 };

 sock.onclose = function() {
     console.log('close');
 };

In this snippet, an instance of SockJS is created, and event handlers for opening the connection, handling incoming messages, and closing the connection are added.

Where are the sockjs-client docs?

For detailed understanding on using SockJS-client, users can discover the thorough documentation at SockJS-client GitHub repository. The documentation comprises interactive demos and code snippets offering a comprehensive idea of how SockJS-client works. Moreover, it covers the entire API and various configuration options available to the users.