Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Motivation: Current WebSocket API has many limitations: 1. It's not possible to be notified of received fragmented frames, they are always aggregated 2. It’s not possible to specify extension bits when sending a frame 3. The API for being notified of write completion is cumbersome 4. There are tons of different interfaces to be notified of the different types of frames 5. Method names are not aligned between `WebSocket` and `WebSocketListener` 6. There are 2 onClose listeners, the default one doesn't expose the code and reason Modifications: 1. Add a new `aggregateWebSocketFrameFragments` config param, defaulting to true. When false, fragmented frames are not aggregated. Drop `WebSocketByteFragmentListener` and `WebSocketTextFragmentListener` and add `finalFragment` and `rsv` parameters to `WebSocketListener` 2. Provide a complete set of send methods on `WebSocket` supporting `rsv` and fragmentation/continuation frame. 3. Have send methods return the Netty future so users can register listeners 4. Drop `WebSocketTextListener`, `WebSocketByteListener`, `WebSocketPingListener` and `WebSocketPongListener` and add default methods on `WebSocketListener`. Drop `DefaultWebSocketListener`. 5. Rename all methods to `sendXXXFrame` and `onXXXFrame` 6. Drop `WebSocketCloseCodeReasonListener` and change `WebSocketListener#onClose` to notify with code and reason. Result: More complete and consistent WebSocket support
- Loading branch information
Showing
26 changed files
with
601 additions
and
945 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.