Refactoring websocket client and server. #1514
Merged
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.
Improvements
Simplified and decreased the code base responsible for the Websocket functionality.
Refactored the WebsocketConnection to be reused in server and client mode.
Documentation for the updated connections.
Breaking Changes (Impact: High)
If you use Websocket functionality make sure to read the notes below.
Renamed Websocket related types, classes and methods. We used to have
WebSocket
andWebsocket
. From now on onlyWebsocket
will be used. ExampleWebsocketConnection::getActiveWebSockets
is nowWebsocketConnection::getActiveWebsockets
.WebsocketConnection
Renamed the method making the
binding
to a http server socket to be calledbind
.WebsocketClient
All methods starting with
setWebSocket
are shortened toset
. Example:setWebSocketMessageHandler
is renamed tosetMessageHandler
.Fixes: #1416.