- Emit binary message as a string with
Encoding::BINARYinstead of an array - Add the option
:binary_data_formatto force the previous behaviour
- Add
base64gem to the dependencies to support Ruby 3.4
- Fix handling of default ports in
Hostheaders on Ruby 3.1+
- Do not change the encoding of strings passed to
Driver#text
- Optimise conversions between strings and byte arrays and related encoding operations, to reduce amount of allocation and copying
- Let the client accept HTTP responses that have an empty reason phrase
following the
101status code
- Emit
pingandpongevents from theServerdriver - Handle draft-76 handshakes correctly if the request's body is a frozen string
- Catch any exceptions produced while generating a handshake response and send a
400 Bad Requestresponse to the client - Pick the RFC-6455 protocol version if the request contains any of the headers used by that version
- Handle errors encountered while handling malformed draft-76 requests
- Change license from MIT to Apache 2.0
- Add
pingandpongto the set of events users can listen to
- Provide a pure-Ruby fallback for the native unmasking code
- Amend warnings issued when running with -W2
- Make sure message strings passed in by the app are transcoded to UTF-8
- Copy strings if necessary for frozen-string compatibility
- Reject draft-76 handshakes if their Sec-WebSocket-Key headers are invalid
- Throw a more helpful error if a client is created with an invalid URL
- When the peer sends a close frame with no error code, emit 1000
- Fix how events are stored in
EventEmitterto fix a backward-compatibility violation introduced in the last release - Use the
Array#packandString#unpackmethods for reading/writing numbers to buffers rather than including duplicate logic for this
- Use
SecureRandomto generate theSec-WebSocket-Keyheader - Allow the parser to recover cleanly if event listeners raise an error
- Let the
on()method take a lambda as a positional argument rather than a block - Add a
pongmethod for sending unsolicited pong frames
- Don't emit extra close frames if we receive a close frame after we already sent one
- Fail the connection when the driver receives an invalid
Sec-WebSocket-Extensionsheader
- Don't treat incoming data as WebSocket frames if a client driver is closed before receiving the server handshake
- Don't emit multiple
errorevents
- Don't allow drivers to be created with unrecognized options
- Support protocol extensions via the websocket-extensions module
- Support connection via HTTP proxies using
CONNECT
- Fix bug where the
Serverdriver doesn't passpingcallbacks to its delegate - Fix an arity error when calling
fail_request - Allow
closeto be called beforestartto close the driver
- Don't hold references to frame buffers after a message has been emitted
- Make sure that
protocolandversionare exposed properly by the TCP driver - Correct HTTP header parsing based on RFC 7230; header names cannot contain backslashes
- Fix problems with loading C and Java native extension code
- Correct the acceptable characters used in the HTTP parser
- Correct the draft-76 status line reason phrase
- Expand
max_lengthto cover sequences of continuation frames anddraft-{75,76} - Decrease default maximum frame buffer size to 64MB
- Stop parsing when the protocol enters a failure mode, to save CPU cycles
- Add a
max_lengthoption to limit allowed frame size
- Support client URLs with Basic Auth credentials
- Fix bug in EventEmitter#emit when listeners are removed
- Fix bug in EventEmitter#listener_count for unregistered events
- Queue sent messages if the client has not begun trying to connect
- Encode all strings sent to I/O as
ASCII-8BIT
- Add API for setting and reading headers
- Add Driver.server() method for getting a driver for TCP servers
- First stable release
- First release
- Proof of concept for people to try out
- Might be unstable