560a78b18f
When close() is called, set a timeout to call beginClose() so the TCP socket is closed if the other peer never replies.
James Coglan2016-12-29 11:26:41 +00:00
6a92cacf62
Apply masking to messages once the payload has been placed in the frame buffer rather than mutating the original message.
James Coglan2016-04-27 22:28:58 +01:00
b0b0d69ce4
Throw a more helpful error if a client driver is created with an invalid URL.
James Coglan2015-10-17 21:44:36 +01:00
dcb3375dda
Run tests on major versions of iojs and node 4.
James Coglan2015-10-17 13:01:07 +01:00
3461e0187b
Run tests on major versions of iojs and node 4.
James Coglan2015-10-17 12:57:58 +01:00
5b59d0fcd8
Use the modulo operator rather than Math.floor() to check whether the draft-76 keys are legit.
James Coglan2015-10-02 21:35:22 +01:00
68990a260b
Close the connection if a draft-76 client sends a Sec-WebSocket-Key header where the numeric value is a non-integer multiple of the number of spaces.
James Coglan2015-10-01 23:47:15 +01:00
eb5e39e7e3
Standardise the words used to refer to chunks of parser input.
James Coglan2015-07-10 22:37:54 +01:00
a95f68080e
Use the buffer.{read,write}UInt{16,32}BE functions to parse and write numbers rather than implementing such things ourselves.
James Coglan2015-07-10 19:57:12 +01:00
14937dd365
Emit an error event *after* setting the ready state to 3.
James Coglan2015-07-08 20:14:14 +01:00
780dd331fe
The 'connect' event should emit a ConnectEvent object.
James Coglan2015-07-07 21:33:15 +01:00
4a3d51cc5b
Incorporate StreamReader into Draft75 so that it retains input and recovers safely from exceptions in event listeners.
James Coglan2015-07-07 21:30:06 +01:00
ed17186354
In the Hybi driver, perform parser state changes before validating and emitting events. This protects the parser against errors thrown by event listeners.
James Coglan2015-07-07 20:30:45 +01:00
d753d09372
Remove the optional signifier from the ping() docs.
James Coglan2015-07-04 21:23:02 +01:00
1df1293456
Change stage in the Base.shutdown() method to that all parsers stop processing input.
James Coglan2015-07-04 21:07:34 +01:00
d901d3e48d
If an event listener emits an error, close the connection with code 1011.
James Coglan2015-07-04 20:54:22 +01:00
a49cd60cb7
Document that on() *adds* a callback, rather than *setting* one, i.e. it does not remove any prior callbacks.
James Coglan2015-07-04 19:31:36 +01:00
4dd872f0ef
Add the pong() command to the documentation.
James Coglan2015-07-04 18:50:55 +01:00
309b5651a7
Implement 'pong' command to hybi.js
Victor Gama2015-02-20 21:33:07 -02:00
febde17f0e
Store the closing parameters (code and reason) before calling 'finalize', so they are emitted if there is no socket connected.
James Coglan2015-07-04 18:33:13 +01:00
c52271c308
Update the TLS certificates since the old ones had expired.
James Coglan2015-06-22 11:17:22 +01:00
8460dd9f03
Add the code and reason parameters to the close() API call.
James Coglan2015-06-22 10:47:50 +01:00