Update unreal sdk to use v3 websocket api#4764
Open
joshua-spacetime wants to merge 2 commits intojoshua/ws/v3from
Open
Update unreal sdk to use v3 websocket api#4764joshua-spacetime wants to merge 2 commits intojoshua/ws/v3from
joshua-spacetime wants to merge 2 commits intojoshua/ws/v3from
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.
Description of Changes
This PR adds Unreal/C++ SDK support for the
v3.bsatn.spacetimedbWebSocket API which was added in #4761.v3is implemented as a thin transport envelope around the existing v2 logical message schema. The SDK continues to use the generated v2ClientMessage/ServerMessagetypes for logical protocol handling, while v3 is used only to wrap and unwrap already-encoded v2 payloads.On the Unreal SDK side, this PR adds:
ClientFrame::{Single, Batch}andServerFrame::{Single, Batch}256 KiBcap for each outbound v3 frameThe batching behavior is intentionally transport-only:
One Unreal-specific implementation detail is that the SDK currently uses a single subprotocol string per connection attempt, so v3/v2 fallback is implemented as “try v3 first, retry with v2 if the initial connection fails,” rather than browser-style multi-protocol negotiation in a single handshake.
This PR also adds focused BSATN roundtrip coverage for the new v3 frame types and updates maintainer docs to clarify that Unreal still uses generated v2 logical bindings while the v3 transport envelope is hand-written.
API and ABI breaking changes
None. Existing v2-only servers continue to work via fallback, and the logical client message API exposed to SDK users is unchanged.
Expected complexity level and risk
3
The main risks are:
Testing
FClientFrame::{Single, Batch}andFServerFrame::{Single, Batch}