Victor Gama
90b8c9d23a
Add tests to others socket states
2015-07-04 18:34:00 +01:00
Victor Gama
c3ac50931e
Implement unit tests for pong method
2015-07-04 18:33:59 +01:00
Victor Gama
5f6873ebc0
Ensure message is always defined
2015-07-04 18:33:59 +01:00
Victor Gama
309b5651a7
Implement 'pong' command to hybi.js
2015-07-04 18:33:59 +01:00
James Coglan
1cc0f33e1c
Update the changelog for 0.5.4.
0.5.4
2015-03-29 23:13:10 +01:00
James Coglan
b273147f0c
Replace 'iff' with 'if and only if'.
2015-03-28 19:44:10 +00:00
James Coglan
d1796bef12
Use require('..') to import this module in examples.
2015-03-28 09:47:59 +00:00
James Coglan
0034f5fe19
Fail the connection when the server receives an invalid Sec-WebSocket-Extensions header.
2015-03-26 08:51:34 +00:00
James Coglan
09f638893e
Bump version to 0.5.4.
2015-03-12 12:59:53 +00:00
James Coglan
8a0235ef51
Don't send a close frame in response to receiving one, if we already sent a close frame.
2015-03-12 12:58:43 +00:00
James Coglan
2b99c23788
Bump version to 0.5.3.
0.5.3
2015-02-22 21:04:03 +00:00
James Coglan
23d0a9ea5e
Don't parse incoming data if the client is already closed. This stops the headers being interpreted as WebSocket data if the client is closed before receiving the server's handshake. Fixes https://github.com/faye/websocket-extensions-node/issues/1 .
2015-02-21 12:34:37 +00:00
James Coglan
0b7eedc3b5
Bump version to 0.5.2.
0.5.2
2015-02-19 09:42:57 +00:00
James Coglan
201e3dd7c5
Test on Node 0.12 and io.js.
2015-02-19 09:26:06 +00:00
James Coglan
8cf42d6050
Apply @zingaburga's StreamReader optimisations from https://github.com/faye/websocket-driver-node/issues/10 .
2015-02-16 20:07:40 +00:00
James Coglan
ebe4ce1382
Because Driver.frame() will now admit input when in readyState 2 (to allow for async extension shutdown), the Messages stream should use the text() and binary() methods that will block messages in that state.
2015-02-16 09:51:40 +00:00
James Coglan
daa37974c6
Don't emit further error/close events if the driver is already closing.
2015-02-16 09:08:10 +00:00
James Coglan
cc5e5c245e
Use Extensions.close(callback) to make sure close follows all pending messages.
...
viz.: https://github.com/faye/websocket-extensions-node/commit/1b77290e8279f654089eac963942309fb19b9312
2015-02-15 13:18:21 +00:00
James Coglan
bdc081ab57
Adapt to the changes to the HTTPParser API introduced in iojs.
2015-02-02 21:06:51 +00:00
James Coglan
57e74231cf
Bump version to 0.5.1.
0.5.1
2014-12-18 02:19:26 +00:00
James Coglan
5cba268409
Throw an error if drivers are created with unrecognised options.
2014-12-17 22:18:06 +00:00
James Coglan
e8992add23
Bump version to 0.5.0 and document how to add extensions.
0.5.0
2014-12-13 13:00:47 +00:00
James Coglan
23675e08ee
Don't expose the internal frame structure of messages to extensions; they should not be able to depend on seeing the actual frame boundaries off the wire because that requires all extensions to leave them intact.
2014-12-06 22:08:37 +00:00
James Coglan
66f46330e7
Remove some blank lines.
2014-12-05 19:36:06 +00:00
James Coglan
7376f48d6a
Catch errors raised by Extensions.activate().
2014-12-02 22:53:16 +00:00
James Coglan
330fa2073d
Don't assume that messages coming out of extensions have anything but the standard websocket-extensions API.
2014-11-29 01:54:20 +00:00
James Coglan
58474a837c
Populate the Message.data field before handing off to extensions.
2014-11-29 01:13:18 +00:00
James Coglan
82182eb348
Close the Extensions object when ending the session.
2014-11-29 00:55:02 +00:00
James Coglan
94041e7a86
websocket-extensions uses Node-style callbacks rather than emitting error events.
2014-11-27 09:32:49 +00:00
James Coglan
e73f7db754
Rename validFrame() to validFrameRsv().
2014-11-26 09:59:08 +00:00
James Coglan
0efc0ebb8d
Don't pass the driver into the Extensions constructor.
2014-11-25 23:17:39 +00:00
James Coglan
f904131d21
Extract the Extensions class into another module.
2014-11-25 21:14:17 +00:00
James Coglan
ee664ba6c9
Decouple Extensions and individual extension libs from the Driver.fail() method, emitting errors instead.
2014-11-25 19:42:54 +00:00
James Coglan
538239b761
Move the header-parsing functions into class methods on Extensions.
2014-11-25 09:11:58 +00:00
James Coglan
2bc103c781
Adjust the data structures in the Extensions parser so that the server sets the order of extensions, per the spec.
2014-11-24 23:03:50 +00:00
James Coglan
eceb59e2fb
Implement the client-side framework for extensions.
2014-11-24 22:05:31 +00:00
James Coglan
40341c5439
The Client driver requires the crypto module for generating keys.
2014-11-24 00:41:34 +00:00
James Coglan
396637d463
Extract permessage-deflate into a separate module.
2014-11-23 21:46:04 +00:00
James Coglan
c986ad231c
Enable strict mode on all source files.
2014-11-23 20:09:26 +00:00
James Coglan
ef897eed1c
Implement deflate compression on server-to-client messages.
2014-11-23 19:45:02 +00:00
James Coglan
724a5f19a4
Flesh out the parameter validation for extensions, and provide better support for multiple values of extension params and HTTP headers.
2014-11-23 15:21:11 +00:00
James Coglan
0332ce2625
Initial support for permessage-deflate, only supports client-to-server compression but enough to pass the Autobahn suite.
2014-11-23 13:11:24 +00:00
James Coglan
6146615801
Extract Hybi parser state into Frame and Message structs.
...
This makes the structure of all the state in the parser easier to see,
it makes it easier to free memory by deleting a single struct rather
than many related fields, and it produces some data structures that will
be useful for adding extensions.
2014-11-22 13:34:34 +00:00
James Coglan
22d483a5ee
Update the 0.4.0 release date.
0.4.0
2014-11-08 19:43:57 +00:00
James Coglan
7325241d11
Move the header setting for Sec-WebSocket-Protocol.
2014-11-08 17:46:03 +00:00
James Coglan
eb2d329a16
Clean up some formatting typos.
2014-11-08 17:20:51 +00:00
James Coglan
7e34e7fd40
Correct the name of the test about proxy 'connect' events.
2014-11-08 16:43:36 +00:00
James Coglan
623a93c0b7
Duplicate headers should be allowed if ALLOWED_DUPLICATES *includes* the name.
2014-11-08 16:39:40 +00:00
James Coglan
208be33754
Refactor the way headers are generated in all the drivers.
2014-11-08 16:12:14 +00:00
James Coglan
0bb47c17b4
Remove TLS concerns from the proxy implementation.
...
This results in a more simple design, in the sense of fewer concerns
being mixed together. It makes the API more verbose, but it's not
difficult to use correctly.
It also means that we make the I/O implementation deal with TLS, so it
can use tls.connect({socket: io}) or the upcoming TLSSocket class,
rather than this module needing a huge amount of boilerplate and
internal indirection to use tls.createSecurePair() and make Proxy wrap
pair.encrypted.
Using tls.connect({socket: io}) would be awkward on this end, because it
expects a stream that emits *incoming* data from the TCP connection. All
the streams in this module emit *outgoing* data that should be written
to TCP, so their polarity is flipped compared to what tls.connect()
wants, and resolving that involves even more stream boilerplate.
2014-11-08 15:20:08 +00:00