RetroChess gxs tunnel integration#8
Open
jolavillette wants to merge 4 commits into
Open
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
RetroChess gxs tunnel integration
Here is a summary of the work performed to integrate and stabilize GXS tunnels in the RetroChess plugin:
GXS Tunnel Integration
Network Routing: Replaced direct SSL transmission with RsGxsTunnelService. The plugin now successfully requests, stores, and reuses secured tunnels between GXS identities.
Pseudo-ID System: Implemented a canonical mapping between GXS IDs and PeerIDs using HEX string conversion. This allows the chess engine (originally designed for SSL PeerIDs) to identify GXS players correctly.
Robust Move Routing: Updated raw_msg_peer to automatically intercept moves intended for GXS players and route them through the appropriate GXS tunnel using real-time tunnel information from the service.
GUI Stability & UX Improvements
Invitation Popup: Replaced the unreliable "green button" in the chat with a standard QMessageBox dialog. This ensures invitations are always visible and 100% responsive to clicks, bypassing chat focus issues.
Identity Resolution: Fixed the "playing against [empty]" bug by ensuring GXS nicknames are correctly resolved and displayed on the game board title.
Deadlock Prevention: Refined mutex locking scopes (RsStackMutex) in critical network handlers to ensure the UI thread never freezes when receiving data or invitations.
Gameplay Synchronization
Role Assignment: Fixed player role synchronization (White/Black). The guest node now correctly receives its role, ensuring that boards are properly oriented for both players.
Protocol Alignment: Standardized the JSON message format for invitations, acceptances, and moves to ensure full interoperability over GXS tunnels.