Skip to content

feat(sockets, server_core): unified socket abstraction#3321

Merged
zmerp merged 4 commits into
masterfrom
feat/unified-sockets
Jun 29, 2026
Merged

feat(sockets, server_core): unified socket abstraction#3321
zmerp merged 4 commits into
masterfrom
feat/unified-sockets

Conversation

@zmerp

@zmerp zmerp commented Jun 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Remove alvr_restart from the C API and ServerCoreContext; RestartPending is now handled identically to ShutdownPending in server_openvr. Also fixes a latent bug where the restart path was missing lifecycle_state = ShuttingDown and an early return, causing fall-through into the StartStream handshake.
  • Misc cleanups: internalize HandGestureManager into tracking_loop as a local variable (removing the Arc<Mutex<>> parameter); move disconnect_notif and tracking_manager resets to be grouped after the handshake; remove redundant braces and stale log messages; note server_ip in ClientConnectionResult is currently unused.
  • SocketConnection abstraction (alvr_sockets): wraps ProtoControlSocket + StreamSocket into a unified interface. Adds connect_to_client, listen_to_server, and send_restart_signal free functions. SocketBufferConfig replaces separate send/recv buffer fields.
  • Use SocketConnection in connection_pipeline: replaces the manual handshake (proto_socket.split + StreamSocketBuilder + separate per-stream setup) with SocketConnection::from_client_connection.

Test plan

  • Server connects to client and streams normally
  • Settings change that requires SteamVR restart triggers restart correctly (no fall-through)
  • Disconnect / reconnect cycle works

🤖 Generated with Claude Code

zmerp and others added 4 commits June 29, 2026 01:51
- 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>
@zmerp zmerp force-pushed the feat/unified-sockets branch from 3e7e0a7 to a3ccef1 Compare June 28, 2026 23:57
@zmerp zmerp merged commit aa458f1 into master Jun 29, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant