Add new RFC 7962-compliant Per-Message Deflate extension implementation #1498
+1,170
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add a reimplementation of the WebSocket Per-Message Deflate extension written from scratch for full RFC 7962 compliance, with the following over the existing implementation:
Otherwise, it is fully API compatible with the old implementation.
For now, the new implementation lives side by side with the old one, and is named "WebSocketPerMessageDeflateExtension".
Add RFC 7962 tests for the new implementation, to validate it produces the expected results for all examples from RFC 7962 section 7.2.3.
Add a copy of the unit tests for the old implementation, which verifies the new implementation works the same, except for fixed issues and different defaults.
Related Issue
This fixes issue #1496
Motivation and Context
The existing implementation was broken in multiple ways and not fully RFC 7962 compliant. The new implementation was written to fix all that.
How Has This Been Tested?
Tested with adapted existing tests for the existing implementation, new RFC 7962 compliance tests (all part of this PR), and also within the Java-OCA-OCPP library, and an integration test which creates an OCPP client and server and connects these on the local machine.
Types of changes
Checklist: