-
build(doc): added documents for this library.
By now, only en-US edition is available.
-
fix(client): the UNIX domain socket path should work as expected.
The UDS path was mistakenly ignored when
forceNewConnectionis set totrueon HTTP connections.
-
fix(client): the UNIX domain socket path should work as expected.
The UDS path was mistakenly ignored when
forceNewConnectionis set totrueon HTTPS connections. -
fix(client): should not crash if timeout during connecting to server.
A missed error event on the socket will cause an uncaught exception.
-
feat(connection): added supports for early data.
The early data is appended to the handshake request or response when the connection is created. Both the client and server can meet the early data during the handshake phase.
For the server, there is no change to the existing API. And for the client, a pair of new APIs are introduced:
createClient(): create a client instance without connecting to the server.createSecureClient(): create a secure client instance without connecting to the server.
After creating the client instance, you can use
connect()method to connect to the server later. And before callingconnect(), you must setup themessageevent handler to receive the early data from the server.The existing
wsConnect()andwssConnect()methods are kept for backward compatibility, but they are now implemented using the new APIs internally. BTW, they are marked as deprecated, and will be removed in future releases.
- feat(connection): added option
forceNewConnectionfor connection creation. - feat(connection): allow sending
BufferinwriteTextmethod.
- fix(connection): added default write-callback in case of missing uncaught exception.
- feat(connection): added
drainevent supports. - feat(connection): added
maxMessageSizereadonly property on connections. - feat(connection): now
createMessageWritermethod returns aWritablestream. - feat(connection): all
writemethod supportscallbackparameter for draining. - feat(connection): refactored the writing logic.
- fix(connection): close the connection correctly on received CLOSE opcode.
- fix(encoding): simplified the code of encoder.
- fix(encoding): failed to decode an empty FIN frame under SIMPLE mode.
- fix(encoding): failed to decode an empty FIN frame under STANDARD mode.
- fix(encoding): a message will be consume multiple times under STANDARD mode.
- fix(client): connection close during handshaking should not throw an error.
- build(project): use term
messageinstead offrame. - feat(connection): added
MessageWriterfor writing fragmented messages. - feat(encoding): added simple mode for decoding with CONTINUATION frames.
- fix(client): add websocket handshake headers to the request automatically.
- fix(encoding): finish decoding empty frame immediately when full header is received.
- fix(connection): renamed
frameevent tomessage.
- fix(connection): should send TEXT frame with writeText method.
- fix(connection): did not reset timeout if it is zero.