Move clientserver package into a new subproject #4751
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.
Identify the Bug or Feature request
First step on #3777
Description of the Change
This moves almost the entirety of the
clientserver
package into a newclientserver
subproject. A bit of work was need to avoid certain references to outside ofclientserver
, but it's mostly mechanical transformation.These seem are the main things to call out:
Handshake
andHandshakeObserver
are now part ofclientserver
as they were part of its interface already, just located elsewhere.WebRTCConnection
no longer directly implements thePeerConnectionObserver
andRTCDataChannelObserver
interfaces, instead providing nested classes for that. Without this change, theclientserver
project would have to leak its dependency on thewebrtc
library.WebRTCConnection
andWebRTCServer
, rather than require a MapToolServerPolicy
we now require just aString
server name, since that was all that was needed.WebRTCConnection
andWebRTCServer
, there were direct references to theMapTool
class in a couple of error handling cases. To avoid this dependency, I addedListener
interfaces to both so the main project can instead provide these calls. I don't especially like this, but I don't think it's worth trying to find a better solution in this PR. I have some more general ideas for reworking client & server code that would allow better handling of these cases, but that will be its own thing.The only thing left behind in the main project was
ConnectionFactory
since that is really MapTool-specific logic rather than a part of the genericclientserver
code.Possible Drawbacks
Should be none, functionality is identical.
Documentation Notes
N/A
Release Notes
clientserver
library into a subproject.This change is