You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add ws' test suite. Note this isn't easy because ws' api does not strictly follow the spec and it occasionally uses internal, underscored properties. Also note that a lot of the validation tests are already handled by the WPTs.
Autobahn testsuite
100% code coverage for lib/websockets Code coverage is high enough; WPTs are not counted, which make up a majority of the tests.
Test more strange/error conditions:
Chunks that contain thousands of frames
Chunks that receive a pong/close frame in the middle of a fragmented message (Control frames are already handled the same.)
Sending invalid frames
Bugs
using WebSocket.send with a Blob asynchronously writes the blob data to the socket. This can cause issues when concurrently sending a blob with anything else. Note: we need support in node core to read a Blob synchronously.
ByteParser.run runs recursively, meaning the max call stack can be exceeded under certain conditions (ie. receiving thousands of frames in a single chunk). Fixed in 1b858fb
Features
Setting an undici Dispatcher rather than using the global dispatcher by default.
Letting the client generate the mask for performance reasons.
permessage-deflatesupportPerformance
Consume the least amount of bytes possible, rather than concatenating every chunk available. See ws' implementation.Fixed in 5165d67Switch to Buffer.allocUnsafe inFixed in b6844f0lib/websocket/frame.jsHandle TODO comments labeled as "optimize this".Use FastBuffer (Buffer[Symbol.species])Tests
Add ws' test suite. Note this isn't easy because ws' api does not strictly follow the spec and it occasionally uses internal, underscored properties. Also note that a lot of the validation tests are already handled by the WPTs.Autobahn testsuite100% code coverage for lib/websocketsCode coverage is high enough; WPTs are not counted, which make up a majority of the tests.Test more strange/error conditions:Chunks that contain thousands of framesChunks that receive a pong/close frame in the middle of a fragmented message(Control frames are already handled the same.)Sending invalid framesBugs
WebSocket.sendwith a Blob asynchronously writes the blob data to the socket. This can cause issues when concurrently sending a blob with anything else. Note: we need support in node core to read a Blob synchronously.Fixed in 1b858fbByteParser.runruns recursively, meaning the max call stack can be exceeded under certain conditions (ie. receiving thousands of frames in a single chunk).Features
Setting an undici Dispatcher rather than using the global dispatcher by default.WebSocketStream