- Fixed a bug when using native keepalive on Node >= 6.0. (Thanks, @prossin)
- Upgrading outdated dependencies
- Official support for Node 6.x
- Updating dependencies. Specifically, updating nan to ^2.3.3
- Updating to work with nan 2.x
- Incremented and re-published to work around an aborted npm publish of v1.0.20.
- Added EventTarget to the W3CWebSocket interface (Thanks, @ibc!)
- Corrected an inaccurate error message. (Thanks, @lekoaf!)
- Updated to nan v1.8.x (tested with v1.8.4)
"license": "Apache-2.0"to package.json via pull request #199 by @pgilad. See npm1k.org.
- Resolves issue #195 - passing number to connection.send() causes crash
- Added close code/reason arguments to W3CWebSocket#close()
- Resolves issue #179 - Allow toBuffer to work with empty data
- Resolves issue #178 - Ping Frames with no data
- Resolves issue #177 - WebSocketClient ignores options unless it has a tlsOptions property
- Resolves issue #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.
- Fixes issue #171 - Code to prevent calling req.accept/req.reject multiple times breaks sanity checks in req.accept
- Fixes issue #170 - Non-native XOR implementation broken after making JSHint happy
- Fixes some undefined behavior surrounding closing WebSocket connections and more reliably handles edge cases.
- Adds an implementation of the W3C WebSocket API for browsers to facilitate sharing code between client and server via browserify. (Thanks, @ibc!)
WebSocketConnection.prototype.closenow accepts optional
rejectmore than once on a
WebSocketRequestwill now throw an error. Issue #149
- Handling connections dropped by client before accepted by server Issue #167
- Integrating Gulp and JSHint (Thanks, @ibc!)
- Starting to add individual unit tests (using substack's tape and faucet)
- Fixed Issue #146 that was causing WebSocketClient to throw errors when instantiated if passed
- Fixing an insidious corner-case bug that prevented
WebSocketConnectionfrom firing the
closeevent in certain cases when there was an error on the underlying
Socket, leading to connections sticking around forever, stuck erroneously in the
connectedstate. These "ghost" connections would cause an error event when trying to write to them.
- Removed deprecated
webSocketVersioninstead (case difference).
- Allowing user to specify all properties for
tlsOptionsin 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)
- Removing support for Node 0.4.x and 0.6.x.
fuzzingclient.jsonspec file for the Autobahn Test Suite.
- Now more fairly emitting
messageevents from the
WebSocketConnection. Previously, all buffered frames for a connection would be processed and all
messageevents 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.
- Now correctly calling the
EventEmittersuperclass constructor during class instance initialization.
WebSocketClient.prototype.connectnow accepts the empty string (
'') to mean "no subprotocol requested." Previously either
nullor an empty array (
) was required.
- Fixing a
- Fixing a potential race condition when attaching event listeners to the underlying
Socket. (Thanks RichardBsolut)
WebSocketClientnow accepts an optional options hash to be passed to
(http|https).request. (Thanks mildred and aus) This enables the following new abilities, amongst others:
- Use WebSocket-Node from behind HTTP/HTTPS proxy servers using koichik/node-tunnel or similar.
- Specify the local port and local address to bind the outgoing request socket to.
- Adding option to ignore
X-Forwarded-Forheaders when accepting connections from untrusted clients.
- Adding ability to mount a
WebSocketServerinstance to an arbitrary number of Node http/https servers.
- 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.
- Incorporating upstream enhancements for the native C++ UTF-8 validation and xor masking functions. (Thanks einaros and kkoopa)
- Fixed remaining naming inconsistency of "websocketVersion" as opposed to "webSocketVersion" throughout the code, and added deprecation warnings for use of the old casing throughout.
- 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.
- Making sure that any socket-level activity timeout that may have been set on a TCP socket is removed when initializing a connection.
- Added support for native TCP Keep-Alive instead of using the WebSocket ping/pong packets to serve that function.
- Fixed cookie parsing to be compliant with RFC 2109
- Reduced Node.JS version requirement back to v0.6.10
- 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.
- Fixes the issues that users were having building the native UTF-8 validator on Windows platforms. Special Thanks to:
- Fixed accidental global variable usage (Thanks, hakobera!)
- 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!)
- Added option to disable logging in the echo-server in the test folder (Thanks, oberstet!)
- 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.
- Updated handling of connection closure to pass more of the Autobahn Test Suite.
- 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)
- Fixing whiteboard example to work under Node 0.6.x (theturtle32)
- Now correctly emitting a
closeevent with a 1006 error code if there is a TCP error while writing to the socket during the handshake. (theturtle32)
- Catching errors when writing to the TCP socket during the handshake. (justoneplanet)
- No longer outputting console.warn messages when there is an error writing to the TCP socket (justoneplanet)
- Fixing some formatting errors, commas, semicolons, etc. (kaisellgren)
- Now works with Node 0.6.2 as well as 0.4.12
- Support TLS in WebSocketClient
- Added support for setting and reading cookies
- Added WebSocketServer.prototype.broadcast(data) convenience method
resourceURLproperty to WebSocketRequest objects. It is a Node URL object with the
resourceand any query string params already parsed.
- The WebSocket request router no longer includes the entire query string when trying to match the path name of the request.
- WebSocketRouterRequest objects now include all the properties and events of WebSocketRequest objects.
- 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.
- Renamed the
webSocketVersionthroughout the code to fix inconsistent capitalization.
websocketVersionhas been kept for compatibility but is deprecated and may be removed in the future.
- 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.
I decided it's time to start maintaining a changelog now, starting with version 1.0.1.