@fairwords/websocket 1.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ name: websocket-tests
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: actions/setup-node@v1
8
+ with:
9
+ node-version: 10.x
10
+
11
+ - uses: actions/checkout@v2
12
+
13
+ - run: npm install
14
+
15
+ - run: npm run test
16
+
package/.jshintrc ADDED
@@ -0,0 +1,88 @@
1
+ {
2
+ // JSHint Default Configuration File (as on JSHint website)
3
+ // See http://jshint.com/docs/ for more details
4
+
5
+ "maxerr" : 50, // {int} Maximum error before stopping
6
+
7
+ // Enforcing
8
+ "bitwise" : false, // true: Prohibit bitwise operators (&, |, ^, etc.)
9
+ "camelcase" : false, // true: Identifiers must be in camelCase
10
+ "curly" : true, // true: Require {} for every new block or scope
11
+ "eqeqeq" : true, // true: Require triple equals (===) for comparison
12
+ "freeze" : true, // true: prohibits overwriting prototypes of native objects such as Array, Date etc.
13
+ "forin" : false, // true: Require filtering for..in loops with obj.hasOwnProperty()
14
+ "immed" : true, // true: Require immediate invocations to be wrapped in parens e.g. `(function () { } ());`
15
+ "latedef" : "nofunc", // true: Require variables/functions to be defined before being used
16
+ "newcap" : true, // true: Require capitalization of all constructor functions e.g. `new F()`
17
+ "noarg" : true, // true: Prohibit use of `arguments.caller` and `arguments.callee`
18
+ "noempty" : true, // true: Prohibit use of empty blocks
19
+ "nonbsp" : true, // true: Prohibit "non-breaking whitespace" characters.
20
+ "nonew" : true, // true: Prohibit use of constructors for side-effects (without assignment)
21
+ "plusplus" : false, // true: Prohibit use of `++` & `--`
22
+ "quotmark" : "single", // Quotation mark consistency:
23
+ // false : do nothing (default)
24
+ // true : ensure whatever is used is consistent
25
+ // "single" : require single quotes
26
+ // "double" : require double quotes
27
+ "undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
28
+ "unused" : "vars", // vars: Require all defined variables be used, ignore function params
29
+ "strict" : false, // true: Requires all functions run in ES5 Strict Mode
30
+ "maxparams" : false, // {int} Max number of formal params allowed per function
31
+ "maxdepth" : false, // {int} Max depth of nested blocks (within functions)
32
+ "maxstatements" : false, // {int} Max number statements per function
33
+ "maxcomplexity" : false, // {int} Max cyclomatic complexity per function
34
+ "maxlen" : false, // {int} Max number of characters per line
35
+
36
+ // Relaxing
37
+ "asi" : false, // true: Tolerate Automatic Semicolon Insertion (no semicolons)
38
+ "boss" : false, // true: Tolerate assignments where comparisons would be expected
39
+ "debug" : false, // true: Allow debugger statements e.g. browser breakpoints.
40
+ "eqnull" : false, // true: Tolerate use of `== null`
41
+ "es5" : false, // true: Allow ES5 syntax (ex: getters and setters)
42
+ "esnext" : true, // true: Allow ES.next (ES6) syntax (ex: `const`)
43
+ "moz" : false, // true: Allow Mozilla specific syntax (extends and overrides esnext features)
44
+ // (ex: `for each`, multiple try/catch, function expression…)
45
+ "evil" : false, // true: Tolerate use of `eval` and `new Function()`
46
+ "expr" : false, // true: Tolerate `ExpressionStatement` as Programs
47
+ "funcscope" : false, // true: Tolerate defining variables inside control statements
48
+ "globalstrict" : false, // true: Allow global "use strict" (also enables 'strict')
49
+ "iterator" : false, // true: Tolerate using the `__iterator__` property
50
+ "lastsemic" : false, // true: Tolerate omitting a semicolon for the last statement of a 1-line block
51
+ "laxbreak" : false, // true: Tolerate possibly unsafe line breakings
52
+ "laxcomma" : false, // true: Tolerate comma-first style coding
53
+ "loopfunc" : false, // true: Tolerate functions being defined in loops
54
+ "multistr" : false, // true: Tolerate multi-line strings
55
+ "noyield" : false, // true: Tolerate generator functions with no yield statement in them.
56
+ "notypeof" : false, // true: Tolerate invalid typeof operator values
57
+ "proto" : false, // true: Tolerate using the `__proto__` property
58
+ "scripturl" : false, // true: Tolerate script-targeted URLs
59
+ "shadow" : false, // true: Allows re-define variables later in code e.g. `var x=1; x=2;`
60
+ "sub" : true, // true: Tolerate using `[]` notation when it can still be expressed in dot notation
61
+ "supernew" : false, // true: Tolerate `new function () { ... };` and `new Object;`
62
+ "validthis" : false, // true: Tolerate using this in a non-constructor function
63
+
64
+ // Environments
65
+ "browser" : true, // Web Browser (window, document, etc)
66
+ "browserify" : true, // Browserify (node.js code in the browser)
67
+ "couch" : false, // CouchDB
68
+ "devel" : true, // Development/debugging (alert, confirm, etc)
69
+ "dojo" : false, // Dojo Toolkit
70
+ "jasmine" : false, // Jasmine
71
+ "jquery" : false, // jQuery
72
+ "mocha" : false, // Mocha
73
+ "mootools" : false, // MooTools
74
+ "node" : true, // Node.js
75
+ "nonstandard" : false, // Widely adopted globals (escape, unescape, etc)
76
+ "prototypejs" : false, // Prototype and Scriptaculous
77
+ "qunit" : false, // QUnit
78
+ "rhino" : false, // Rhino
79
+ "shelljs" : false, // ShellJS
80
+ "worker" : false, // Web Workers
81
+ "wsh" : false, // Windows Scripting Host
82
+ "yui" : false, // Yahoo User Interface
83
+
84
+ // Custom Globals
85
+ "globals" : { // additional predefined global variables
86
+ "WebSocket": true
87
+ }
88
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,291 @@
1
+ Changelog
2
+ =========
3
+
4
+ Version 1.0.34
5
+ --------------
6
+ *Released 2021-04-14*
7
+
8
+ * Updated browser shim to use the native `globalThis` property when available. See [this MDN page](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) for context. Resolves [#415](https://github.com/theturtle32/WebSocket-Node/issues/415)
9
+
10
+ Version 1.0.33
11
+ --------------
12
+ *Released 2020-12-08*
13
+
14
+ * Added new configuration options to WebSocketServer allowing implementors to bypass parsing WebSocket extensions and HTTP Cookies if they are not needed. (Thanks, [@aetheon](https://github.com/aetheon))
15
+ * Added new `upgradeError` event to WebSocketServer to allow for visibility into and logging of any parsing errors that might occur during the HTTP Upgrade phase. (Thanks, [@aetheon](https://github.com/aetheon))
16
+
17
+ Version 1.0.32
18
+ --------------
19
+ *Released 2020-08-28*
20
+
21
+ * Refactor to use [N-API modules](https://nodejs.org/api/n-api.html) from [ws project](https://github.com/websockets). (Thanks, [@andreek](https://github.com/andreek))
22
+ * Specifically:
23
+ * [utf-8-validate](https://github.com/websockets/utf-8-validate)
24
+ * [bufferutil](https://github.com/websockets/bufferutil)
25
+ * Removed some documentation notations about very old browsers and very old Websocket protocol drafts that are no longer relevant today in 2020.
26
+ * Removed outdated notations and instructions about building native extensions, since those functions are now delegated to dependencies.
27
+ * Add automated unit test executionn via Github Actions (Thanks, [@nebojsa94](https://github.com/nebojsa94))
28
+ * Accept new connection close code `1015` ("TLS Handshake"). (More information at the [WebSocket Close Code Number Registry](https://www.iana.org/assignments/websocket/websocket.xhtml#close-code-number))
29
+
30
+ Version 1.0.31
31
+ --------------
32
+ *Released 2019-12-06*
33
+
34
+ * Fix [infinite loop in error handling](https://github.com/theturtle32/WebSocket-Node/issues/329) (Thanks, [@apirila](https://github.com/apirila))
35
+ * Fix [memory leak with multiple WebSocket servers on the same HTTP server](https://github.com/theturtle32/WebSocket-Node/pull/339) (Thanks, [@nazar-pc](https://github.com/nazar-pc))
36
+ * [Use es5-ext/global as a more robust way to resolve browser's window object](https://github.com/theturtle32/WebSocket-Node/pull/362) (Thanks, [@michaelsbradleyjr](https://github.com/michaelsbradleyjr))
37
+ * [adding compatibility with V8 release greater than v7.6 (node and electron engines)](https://github.com/theturtle32/WebSocket-Node/pull/376) (Thanks, [@artynet](https://github.com/artynet))
38
+
39
+ Version 1.0.30
40
+ --------------
41
+ *Released 2019-09-12*
42
+
43
+ * Moved gulp back to devDependencies
44
+
45
+ Version 1.0.29
46
+ --------------
47
+ *Released 2019-07-03*
48
+
49
+ * Updated some dependencies and updated the .gitignore and .npmignore files
50
+
51
+ Version 1.0.28
52
+ --------------
53
+ *Released 2018-09-19*
54
+
55
+ * Updated to latest version of [nan](https://github.com/nodejs/nan)
56
+
57
+ Version 1.0.27
58
+ --------------
59
+ *Released 2018-09-19*
60
+
61
+ * Allowing additional request `headers` to be specified in the `tlsOptions` config parameter for WebSocketClient. See pull request #323
62
+ * Resolving deprecation warnings relating to usage of `new Buffer`
63
+
64
+ Version 1.0.26
65
+ --------------
66
+ *Released 2018-04-27*
67
+
68
+ * No longer using the deprecated `noAssert` parameter for functions reading and writing binary numeric data. (Thanks, [@BridgeAR](https://github.com/BridgeAR))
69
+
70
+ Version 1.0.25
71
+ --------------
72
+ *Released 2017-10-18*
73
+
74
+ * Bumping minimum supported node version specified in package.json to v0.10.x because some upstream libraries no longer install on v0.8.x
75
+ * [Allowing use of close codes 1012, 1013, 1014](https://www.iana.org/assignments/websocket/websocket.xml)
76
+ * [Allowing the `Host` header to be overridden.](https://github.com/theturtle32/WebSocket-Node/pull/291) (Thanks, [@Juneil](https://github.com/Juneil))
77
+ * [Mitigating infinite loop for broken connections](https://github.com/theturtle32/WebSocket-Node/pull/289) (Thanks, [@tvkit](https://github.com/tvkit))
78
+ * [Fixed Markdown Typos](https://github.com/theturtle32/WebSocket-Node/pull/281) (Thanks, [@teramotodaiki](https://github.com/teramotodaiki))
79
+ * [Adding old readyState constants for W3CWebSocket interface](https://github.com/theturtle32/WebSocket-Node/pull/282) (Thanks, [@thechriswalker](https://github.com/thechriswalker))
80
+
81
+
82
+ Version 1.0.24
83
+ --------------
84
+ *Released 2016-12-28*
85
+
86
+ * Fixed a bug when using native keepalive on Node >= 6.0. (Thanks, [@prossin](https://github.com/prossin))
87
+ * Upgrading outdated dependencies
88
+
89
+ Version 1.0.23
90
+ --------------
91
+ *Released 2016-05-18*
92
+
93
+ * Official support for Node 6.x
94
+ * Updating dependencies. Specifically, updating nan to ^2.3.3
95
+
96
+ Version 1.0.22
97
+ --------------
98
+ *Released 2015-09-28*
99
+
100
+ * Updating to work with nan 2.x
101
+
102
+ Version 1.0.21
103
+ --------------
104
+ *Released 2015-07-22*
105
+
106
+ * Incremented and re-published to work around an aborted npm publish of v1.0.20.
107
+
108
+ Version 1.0.20
109
+ --------------
110
+ *Released 2015-07-22*
111
+
112
+ * Added EventTarget to the W3CWebSocket interface (Thanks, [@ibc](https://github.com/ibc)!)
113
+ * Corrected an inaccurate error message. (Thanks, [@lekoaf](https://github.com/lekoaf)!)
114
+
115
+ Version 1.0.19
116
+ --------------
117
+ *Released 2015-05-28*
118
+
119
+ * Updated to nan v1.8.x (tested with v1.8.4)
120
+ * Added `"license": "Apache-2.0"` to package.json via [pull request #199](https://github.com/theturtle32/WebSocket-Node/pull/199) by [@pgilad](https://github.com/pgilad). See [npm1k.org](http://npm1k.org/).
121
+
122
+
123
+ Version 1.0.18
124
+ --------------
125
+ *Released 2015-03-19*
126
+
127
+ * Resolves [issue #195](https://github.com/theturtle32/WebSocket-Node/pull/179) - passing number to connection.send() causes crash
128
+ * [Added close code/reason arguments to W3CWebSocket#close()](https://github.com/theturtle32/WebSocket-Node/issues/184)
129
+
130
+
131
+ Version 1.0.17
132
+ --------------
133
+ *Released 2015-01-17*
134
+
135
+ * Resolves [issue #179](https://github.com/theturtle32/WebSocket-Node/pull/179) - Allow toBuffer to work with empty data
136
+
137
+
138
+ Version 1.0.16
139
+ --------------
140
+ *Released 2015-01-16*
141
+
142
+ * Resolves [issue #178](https://github.com/theturtle32/WebSocket-Node/issues/178) - Ping Frames with no data
143
+
144
+
145
+ Version 1.0.15
146
+ --------------
147
+ *Released 2015-01-13*
148
+
149
+ * Resolves [issue #177](https://github.com/theturtle32/WebSocket-Node/issues/177) - WebSocketClient ignores options unless it has a tlsOptions property
150
+
151
+
152
+ Version 1.0.14
153
+ --------------
154
+ *Released 2014-12-03*
155
+
156
+ * Resolves [issue #173](https://github.com/theturtle32/WebSocket-Node/issues/173) - To allow the W3CWebSocket interface to accept an optional non-standard configuration object as its third parameter, which will be ignored when running in a browser context.
157
+
158
+
159
+ Version 1.0.13
160
+ --------------
161
+ *Released 2014-11-29*
162
+
163
+ * Fixes [issue #171](https://github.com/theturtle32/WebSocket-Node/issues/171) - Code to prevent calling req.accept/req.reject multiple times breaks sanity checks in req.accept
164
+
165
+
166
+ Version 1.0.12
167
+ --------------
168
+ *Released 2014-11-28*
169
+
170
+ * Fixes [issue #170](https://github.com/theturtle32/WebSocket-Node/issues/170) - Non-native XOR implementation broken after making JSHint happy
171
+
172
+
173
+ Version 1.0.11
174
+ --------------
175
+ *Released 2014-11-25*
176
+
177
+ * Fixes some undefined behavior surrounding closing WebSocket connections and more reliably handles edge cases.
178
+ * Adds an implementation of the W3C WebSocket API for browsers to facilitate sharing code between client and server via browserify. (Thanks, [@ibc](https://github.com/ibc)!)
179
+ * `WebSocketConnection.prototype.close` now accepts optional `reasonCode` and `description` parameters.
180
+ * Calling `accept` or `reject` more than once on a `WebSocketRequest` will now throw an error. [Issue #149](https://github.com/theturtle32/WebSocket-Node/issues/149)
181
+ * Handling connections dropped by client before accepted by server [Issue #167](https://github.com/theturtle32/WebSocket-Node/issues/167)
182
+ * Integrating Gulp and JSHint (Thanks, [@ibc](https://github.com/ibc)!)
183
+ * Starting to add individual unit tests (using substack's [tape](github.com/substack/tape) and [faucet](github.com/substack/faucet))
184
+
185
+
186
+ Version 1.0.10
187
+ --------------
188
+ *Released 2014-10-22*
189
+
190
+ * Fixed Issue [#146](https://github.com/theturtle32/WebSocket-Node/issues/146) that was causing WebSocketClient to throw errors when instantiated if passed `tlsOptions`.
191
+
192
+ Version 1.0.9
193
+ -------------
194
+ *Released 2014-10-20*
195
+
196
+ * Fixing an insidious corner-case bug that prevented `WebSocketConnection` from firing the `close` event in certain cases when there was an error on the underlying `Socket`, leading to connections sticking around forever, stuck erroneously in the `connected` state. These "ghost" connections would cause an error event when trying to write to them.
197
+ * Removed deprecated `websocketVersion` property. Use `webSocketVersion` instead (case difference).
198
+ * Allowing user to specify all properties for `tlsOptions` in WebSocketClient, not just a few whitelisted properties. This keeps us from having to constantly add new config properties for new versions of Node. (Thanks, [jesusprubio](https://github.com/jesusprubio))
199
+ * Removing support for Node 0.4.x and 0.6.x.
200
+ * Adding `fuzzingclient.json` spec file for the Autobahn Test Suite.
201
+ * Now more fairly emitting `message` events from the `WebSocketConnection`. Previously, all buffered frames for a connection would be processed and all `message` events emitted before moving on to processing the next connection with available data. Now We process one frame per connection (most of the time) in a more fair round-robin fashion.
202
+ * Now correctly calling the `EventEmitter` superclass constructor during class instance initialization.
203
+ * `WebSocketClient.prototype.connect` now accepts the empty string (`''`) to mean "no subprotocol requested." Previously either `null` or an empty array (`[]`) was required.
204
+ * Fixing a `TypeError` bug in `WebSocketRouter` (Thanks, [a0000778](https://github.com/a0000778))
205
+ * Fixing a potential race condition when attaching event listeners to the underlying `Socket`. (Thanks [RichardBsolut](https://github.com/RichardBsolut))
206
+ * `WebSocketClient` now accepts an optional options hash to be passed to `(http|https).request`. (Thanks [mildred](https://github.com/mildred) and [aus](https://github.com/aus)) This enables the following new abilities, amongst others:
207
+ * Use WebSocket-Node from behind HTTP/HTTPS proxy servers using [koichik/node-tunnel](https://github.com/koichik/node-tunnel) or similar.
208
+ * Specify the local port and local address to bind the outgoing request socket to.
209
+ * Adding option to ignore `X-Forwarded-For` headers when accepting connections from untrusted clients.
210
+ * Adding ability to mount a `WebSocketServer` instance to an arbitrary number of Node http/https servers.
211
+ * Adding browser shim so Browserify won't blow up when trying to package up code that uses WebSocket-Node. The shim is a no-op, it ***does not implement a wrapper*** providing the WebSocket-Node API in the browser.
212
+ * Incorporating upstream enhancements for the native C++ UTF-8 validation and xor masking functions. (Thanks [einaros](https://github.com/einaros) and [kkoopa](https://github.com/kkoopa))
213
+
214
+
215
+ Version 1.0.8
216
+ -------------
217
+ *Released 2012-12-26*
218
+
219
+ * Fixed remaining naming inconsistency of "websocketVersion" as opposed to "webSocketVersion" throughout the code, and added deprecation warnings for use of the old casing throughout.
220
+ * Fixed an issue with our case-insensitive handling of WebSocket subprotocols. Clients that requested a mixed-case subprotocol would end up failing the connection when the server accepted the connection, returning a lower-case version of the subprotocol name. Now we return the subprotocol name in the exact casing that was requested by the client, while still maintaining the case-insensitive verification logic for convenience and practicality.
221
+ * Making sure that any socket-level activity timeout that may have been set on a TCP socket is removed when initializing a connection.
222
+ * Added support for native TCP Keep-Alive instead of using the WebSocket ping/pong packets to serve that function.
223
+ * Fixed cookie parsing to be compliant with RFC 2109
224
+
225
+ Version 1.0.7
226
+ -------------
227
+ *Released 2012-08-12*
228
+
229
+ * ***Native modules are now optional!*** If they fail to compile, WebSocket-Node will still work but will not verify that received UTF-8 data is valid, and xor masking/unmasking of payload data for security purposes will not be as efficient as it is performed in JavaScript instead of native code.
230
+ * Reduced Node.JS version requirement back to v0.6.10
231
+
232
+ Version 1.0.6
233
+ -------------
234
+ *Released 2012-05-22*
235
+
236
+ * Now requires Node v0.6.13 since that's the first version that I can manage to successfully build the native UTF-8 validator with node-gyp through npm.
237
+
238
+ Version 1.0.5
239
+ -------------
240
+ *Released 2012-05-21*
241
+
242
+ * Fixes the issues that users were having building the native UTF-8 validator on Windows platforms. Special Thanks to:
243
+ * [zerodivisi0n](https://github.com/zerodivisi0n)
244
+ * [andreasbotsikas](https://github.com/andreasbotsikas)
245
+ * Fixed accidental global variable usage (Thanks, [hakobera](https://github.com/hakobera)!)
246
+ * Added callbacks to the send* methods that provide notification of messages being sent on the wire and any socket errors that may occur when sending a message. (Thanks, [zerodivisi0n](https://github.com/zerodivisi0n)!)
247
+ * Added option to disable logging in the echo-server in the test folder (Thanks, [oberstet](https://github.com/oberstet)!)
248
+
249
+
250
+ Version 1.0.4
251
+ -------------
252
+ *Released 2011-12-18*
253
+
254
+ * Now validates that incoming UTF-8 messages do, in fact, contain valid UTF-8 data. The connection is dropped with prejudice if invalid data is received. This strict behavior conforms to the WebSocket RFC and is verified by the Autobahn Test Suite. This is accomplished in a performant way by using a native C++ Node module created by [einaros](https://github.com/einaros).
255
+ * Updated handling of connection closure to pass more of the Autobahn Test Suite.
256
+
257
+ Version 1.0.3
258
+ -------------
259
+ *Released 2011-12-18*
260
+
261
+ * Substantial speed increase (~150% on my machine, depending on the circumstances) due to an optimization in FastBufferList.js that drastically reduces the number of memory alloctions and buffer copying. ([kazuyukitanimura](https://github.com/kazuyukitanimura))
262
+
263
+
264
+ Version 1.0.2
265
+ -------------
266
+ *Released 2011-11-28*
267
+
268
+ * Fixing whiteboard example to work under Node 0.6.x ([theturtle32](https://github.com/theturtle32))
269
+ * Now correctly emitting a `close` event with a 1006 error code if there is a TCP error while writing to the socket during the handshake. ([theturtle32](https://github.com/theturtle32))
270
+ * Catching errors when writing to the TCP socket during the handshake. ([justoneplanet](https://github.com/justoneplanet))
271
+ * No longer outputting console.warn messages when there is an error writing to the TCP socket ([justoneplanet](https://github.com/justoneplanet))
272
+ * Fixing some formatting errors, commas, semicolons, etc. ([kaisellgren](https://github.com/kaisellgren))
273
+
274
+
275
+ Version 1.0.1
276
+ -------------
277
+ *Released 2011-11-21*
278
+
279
+ * Now works with Node 0.6.2 as well as 0.4.12
280
+ * Support TLS in WebSocketClient
281
+ * Added support for setting and reading cookies
282
+ * Added WebSocketServer.prototype.broadcast(data) convenience method
283
+ * Added `resourceURL` property to WebSocketRequest objects. It is a Node URL object with the `resource` and any query string params already parsed.
284
+ * The WebSocket request router no longer includes the entire query string when trying to match the path name of the request.
285
+ * WebSocketRouterRequest objects now include all the properties and events of WebSocketRequest objects.
286
+ * Removed more console.log statements. Please rely on the various events emitted to be notified of error conditions. I decided that it is not a library's place to spew information to the console.
287
+ * Renamed the `websocketVersion` property to `webSocketVersion` throughout the code to fix inconsistent capitalization. `websocketVersion` has been kept for compatibility but is deprecated and may be removed in the future.
288
+ * Now outputting the sanitized version of custom header names rather than the raw value. This prevents invalid HTTP from being put onto the wire if given an illegal header name.
289
+
290
+
291
+ I decided it's time to start maintaining a changelog now, starting with version 1.0.1.
package/Jenkinsfile ADDED
@@ -0,0 +1,7 @@
1
+ @Library("honcho@master") _
2
+
3
+ echo "Working on branch ${BRANCH_NAME}"
4
+
5
+ if(BRANCH_NAME=='develop'){
6
+ NPM_Publish {}
7
+ }
package/LICENSE ADDED
@@ -0,0 +1,177 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
package/Makefile ADDED
@@ -0,0 +1,5 @@
1
+ autobahn:
2
+ @NODE_PATH=lib node test/autobahn-test-client.js --host=127.0.0.1 --port=9000
3
+
4
+ autobahn-server:
5
+ @NODE_PATH=lib node test/echo-server.js