feat(sockets, server_core): unified socket abstraction#3321
Merged
Conversation
- Remove alvr_restart() from the C API and restart() from ServerCoreContext; RestartPending now handled identically to ShutdownPending in server_openvr - Fix latent bug: restart path missing lifecycle_state=ShuttingDown and early return, causing fall-through into StartStream handshake Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Internalize HandGestureManager into tracking_loop as a local variable, removing the Arc<Mutex<>> parameter - Move disconnect_notif and tracking_manager resets to be grouped together after the handshake completes, next to bitrate_manager - Remove redundant braces around enable_on_connect_script block - Remove stale debug log, update log messages - Note that server_ip in ClientConnectionResult is currently unused Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wraps ProtoControlSocket + StreamSocket into a unified SocketConnection that hides the handshake protocol. Adds connect_to_client, listen_to_server and send_restart_signal free functions. StreamSocketConfig consolidates buffer config into a single field. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace manual handshake (proto_socket.split + StreamSocketBuilder + separate stream setup) with SocketConnection.from_client_connection. Move connection_result recv into alvr_sockets::connect_to_client. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3e7e0a7 to
a3ccef1
Compare
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.
Summary
alvr_restartfrom the C API andServerCoreContext;RestartPendingis now handled identically toShutdownPendinginserver_openvr. Also fixes a latent bug where the restart path was missinglifecycle_state = ShuttingDownand an early return, causing fall-through into theStartStreamhandshake.HandGestureManagerintotracking_loopas a local variable (removing theArc<Mutex<>>parameter); movedisconnect_notifandtracking_managerresets to be grouped after the handshake; remove redundant braces and stale log messages; noteserver_ipinClientConnectionResultis currently unused.SocketConnectionabstraction (alvr_sockets): wrapsProtoControlSocket+StreamSocketinto a unified interface. Addsconnect_to_client,listen_to_server, andsend_restart_signalfree functions.SocketBufferConfigreplaces separate send/recv buffer fields.SocketConnectioninconnection_pipeline: replaces the manual handshake (proto_socket.split+StreamSocketBuilder+ separate per-stream setup) withSocketConnection::from_client_connection.Test plan
🤖 Generated with Claude Code