Skip to content

Refactor SocketAdapter from mixin pattern to a wrapper#1000

Merged
EzraBrooks merged 1 commit intodevelopfrom
refactor-socketadapter
Nov 6, 2025
Merged

Refactor SocketAdapter from mixin pattern to a wrapper#1000
EzraBrooks merged 1 commit intodevelopfrom
refactor-socketadapter

Conversation

@EzraBrooks
Copy link
Copy Markdown
Contributor

@EzraBrooks EzraBrooks commented Nov 5, 2025

I think this is a more sensical approach to this problem. SocketAdapter provides a coherent ROS API on top of either a browser WebSocket, a ws WebSocket, or an RTCDataChannel - it should be written as a wrapper.

This technically breaks an API, but only because of Hyrum's Law.. I hope nobody was interacting directly with the .socket member of Ros 🤦🏻

This contains no functional changes, it just changes the scope of some of the socket-handling callbacks to be less confusing.

@EzraBrooks EzraBrooks force-pushed the refactor-socketadapter branch from b9ca5a8 to e2a4af0 Compare November 5, 2025 22:55
Base automatically changed from add-protocol-type-validation to develop November 6, 2025 16:25
@EzraBrooks EzraBrooks force-pushed the refactor-socketadapter branch from e2a4af0 to 0138360 Compare November 6, 2025 16:34
@EzraBrooks EzraBrooks marked this pull request as ready for review November 6, 2025 16:36
@EzraBrooks EzraBrooks requested review from bjsowa and sea-bass November 6, 2025 16:36
@bjsowa

This comment was marked as resolved.

@EzraBrooks EzraBrooks force-pushed the refactor-socketadapter branch from 0138360 to 5f45935 Compare November 6, 2025 16:48
@EzraBrooks

This comment was marked as resolved.

@EzraBrooks EzraBrooks force-pushed the refactor-socketadapter branch from 5f45935 to 6aa2e4e Compare November 6, 2025 16:49
I think this is a more sensical approach to this problem. SocketAdapter
provides a coherent ROS API on top of either a browser WebSocket, a ws WebSocket,
or an RTCDataChannel - it should be written as a wrapper.
@EzraBrooks EzraBrooks merged commit 9edb2a4 into develop Nov 6, 2025
3 checks passed
@EzraBrooks EzraBrooks deleted the refactor-socketadapter branch November 6, 2025 18:39
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.

2 participants