Skip to content

Conversation

@binn
Copy link
Contributor

@binn binn commented Dec 27, 2025

This PR bring support to VRChat's WebSocket API through a third package, VRChat.API.Realtime.

Here is the rundown:

  • Support for every event type listed in https://vrchat.community/websocket
  • Introduces IVRChatRealtime and VRChatRealtimeClientBuilder
  • Same interfaces to build realtime clients as primary VRChat.API
  • Does not share model classes with generated spec
  • To alleviate the bug where Cloudflare stops sending data, there is an AutoReconnectMode enum with options for OnDisconnect, Every10Min, and Every20Min
  • Also, to also try to alleviate the Cloudflare bug, the library sends a nonce'd heartbeat every 30 seconds to keep data flowing between the API and the client.
  • In the future, this option will be toggleable
  • Easy to build more events onto the existing system, just make the model class and add the event type to the switch in ProcessMessage
  • Updated docs to include WebSocket info and WEBSOCKET.md for WebSocket specific docs.
  • Created an example project in examples/ folder for WebSocket.
  • Implemented XMLDoc for all types and properties, so if you're using a modern IDE, the library is self documented in your LSP.
  • Updated CI to support the new nightly releases by Aries, with the help of @C0D3-M4513R
  • Created a new CI workflow for pushing manual releases of Realtime SDK, as it's independent of generated SDK and will need manual releases.

Some things to consider:

  • I didn't have time to fully test every event, so I need the community's help to come test and verify everything is correct.
  • I used Claude Code to help me generate the models for the event types, I did my best to verify accuracy but I fear there may be some mistakes that need to be fixed
  • This library is not generated at all, so it will need to be maintained by hand, and that's why it's a separate package from the others.

Please let me know your thoughts and any testing you encounter.

@binn
Copy link
Contributor Author

binn commented Dec 27, 2025

Reopened upon request of @jellejurre

@binn
Copy link
Contributor Author

binn commented Dec 27, 2025

I added @C0D3-M4513R's changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant