Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

websocket

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

websocket - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

2

lib/websocket.js

@@ -7,3 +7,3 @@ module.exports = {

"request" : require('./WebSocketRequest'),
"version" : "0.0.11"
"version" : "0.0.12"
};

@@ -77,2 +77,5 @@ var extend = require('./utils').extend;

var s = this;
if (typeof(protocols) === 'string') {
protocols = [protocols];
}
if (!(protocols instanceof Array)) {

@@ -125,9 +128,2 @@ protocols = [];

var requestOptions = {
host: this.url.hostname,
port: this.url.port,
method: 'GET',
path: this.url.pathname
};
var hostHeaderValue = this.url.hostname;

@@ -134,0 +130,0 @@ if ((this.url.protocol === 'ws:' && this.url.port !== '80') ||

@@ -6,3 +6,3 @@ {

"author": "Brian McKelvey <brian@worlize.com>",
"version": "0.0.11",
"version": "0.0.12",
"repository": {

@@ -9,0 +9,0 @@ "type": "git",

WebSocket Client & Server Implementation for Node
=================================================
*WARNING: This is an experimental library implementing the most recent draft of the WebSocket proposal.*
*WARNING: This is a library implementing only the most recent draft of the WebSocket protocol. It will not work with production browsers until new versions are released that support it.*

@@ -12,12 +12,18 @@ **Note about FireFox 6: Firefox 6 re-enables support for WebSockets by default. It uses a prefixed constructor name, MozWebSocket(), to avoid conflicting with already deployed scripts. It also implements draft-07, so if you want to target Firefox 6, you will need to checkout my draft-07 branch, not the latest one.**

This is a pure JavaScript implementation of the WebSocket Draft -09 for Node. There are some example client and server applications that implement various interoperability testing protocols in the "test" folder.
This is a pure JavaScript implementation of the WebSocket protocol version 8 for Node. There are some example client and server applications that implement various interoperability testing protocols in the "test" folder.
For a WebSocket -09 client written in Flash see my [AS3WebScocket](https://github.com/Worlize/AS3WebSocket) project.
For a WebSocket draft-08/-09/-10 client written in Flash see my [AS3WebScocket](https://github.com/Worlize/AS3WebSocket) project.
*There will not be a draft-08 implementation, as the -08 specification was only out for a week before being superseded by -09.*
*The latest three drafts of the WebSocket protocol, draft-08, draft-09, and draft-10, are functionally identical and implement the same wire protocol, protocol version "8". They are all interoperable, with only editorial changes across the three drafts. The current implementation of WebSocket-Node works with all three.*
If you're looking for the version supporting draft-07 or draft-06, see the draft-07 or draft-06 branches. It will not be maintained, as I plan to track each subsequent draft of the protocol until it's finalized, and will ultimately be supporting *only* the final draft.
If you're looking for the version supporting draft-07 or draft-06, see the draft-07 or draft-06 branches. Previous draft branches will not be maintained, as I plan to track each subsequent draft of the protocol until it's finalized, and will ultimately be supporting *only* the final draft.
**Tested against Node version 0.4.7.** It may work in earlier versions but I haven't tried it. YMMV.
Browser Support
---------------
* Firefox Aurora 7 (Protocol Version 8)
* Chrome 14 (Beta channel) (Protocol Version 8)
Installation

@@ -38,3 +44,3 @@ ------------

-----------------
- Draft-09 framing and handshake
- Protocol version "8" (Draft-08/-09/-10) framing and handshake
- Can handle/aggregate received fragmented messages

@@ -140,3 +146,3 @@ - Can fragment outgoing messages

client.connect("ws://localhost:8080/", ['echo-protocol']);
client.connect("ws://localhost:8080/", 'echo-protocol');

@@ -152,2 +158,7 @@ Request Router Example

For more complete documentation, see the [Documentation Wiki](https://github.com/Worlize/WebSocket-Node/wiki/Documentation).
For more complete documentation, see the [Documentation Wiki](https://github.com/Worlize/WebSocket-Node/wiki/Documentation).
Resources
---------
A presentation on the state of the WebSockets protocol that I gave on July 23, 2011 at the LA Hacker News meetup. [WebSockets: The Real-Time Web, Delivered](http://www.scribd.com/doc/60898569/WebSockets-The-Real-Time-Web-Delivered)

@@ -143,2 +143,2 @@ #!/usr/bin/env node

client.connect(args.protocol + '//' + args.host + ':' + args.port + '/', ['fragmentation-test']);
client.connect(args.protocol + '//' + args.host + ':' + args.port + '/', 'fragmentation-test');

@@ -54,3 +54,3 @@ #!/usr/bin/env node

mirrorClient.connect(args.protocol + '//' + args.host + ':' + args.port + '/', ['lws-mirror-protocol']);
mirrorClient.connect(args.protocol + '//' + args.host + ':' + args.port + '/', 'lws-mirror-protocol');

@@ -77,2 +77,2 @@

incrementClient.connect(args.protocol + '//' + args.host + ':' + args.port + '/', ['dumb-increment-protocol']);
incrementClient.connect(args.protocol + '//' + args.host + ':' + args.port + '/', 'dumb-increment-protocol');
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc