Skip to content

2.0.0

Choose a tag to compare

@LucHeart LucHeart released this 11 Sep 19:02
· 2 commits to main since this release
2.0.0
8cdb0bb

The library now works with any OSCQuery app, not just VRChat. The VRChat support is built on top of the new general-purpose parts.

⚠️ Breaking changes

Renames

1.2.0 2.0.0
OscQueryLibrary.OscQueryServer OscQueryLibrary.VRChat.VrOscQueryServer
OscQueryServer.FoundVrcClient VrOscQueryServer.FoundVrClient
OscQueryServer.ParameterUpdateArgs VrOscQueryServer.ParameterUpdateArgs
HostInfo OscQueryHostInfo
HostInfo.OscTransportType OscTransport

OscReceivePort, ParameterUpdate, Start(), RefreshParameters() and Dispose() are unchanged. The constructor takes the same arguments, plus an optional instanceFilter.

Other changes

  • Node, Node<T>, RootNode, AvatarContents, OscParameterNode and OscParameterNodeEnd<T> are merged into a single OscQueryNode, with Find(path) and Descendants().
  • OscQueryHostInfo properties are now optional (nullable). Extensions is a Dictionary<string, bool> (e.g. Extensions["ACCESS"]) instead of HostInfo.ExtensionsNode.
  • Target frameworks are now netstandard2.1, net9.0 and net10.0. net8.0 is dropped.

✨ New

  • OscQueryDiscovery: finds every OSCQuery service (_oscjson._tcp) on the network over mDNS and reads its HOST_INFO. It fires ServiceDiscovered/ServiceLost and drops services that say goodbye or stop responding.
  • OscQueryHttpClient: reads HOST_INFO and the address space of any OSCQuery server.
  • OscQueryHost: serves your own address space over HTTP and advertises it over mDNS. You can swap the tree at runtime, and single-attribute queries (/path?VALUE) work.
  • Multiple VR clients: VrOscQueryServer tracks every client on the network.
    • A client on the same machine is preferred; otherwise the most recently found one is used.
    • VrcClients lists all known clients and CurrentVrClient is the one in use.
    • SelectVrClient pins a specific client.
    • New VrClientDiscovered/VrClientLost events.
    • If the active client leaves or stops responding, the next best one takes over.
  • The instanceFilter parameter lets VrOscQueryServer work with VRChat-compatible apps other than VRChat.
  • OscQueryExplorer: a terminal app that lists every OSCQuery service on the network and shows its live address space.

🐛 Fixes & improvements

  • Every mDNS query now gets a unique ID, and duplicate-message filtering is off. Previously, if another app had queried shortly before, VRChat and other responders built on MeaMod ignored our queries.
  • Services that are advertised but don't answer are retried with backoff (15s, doubling, up to 5 minutes) instead of on every announcement. Health checks drop a service after two failed checks in a row.
  • When a service advertises several addresses, local ones are tried first and the first one that answers is kept.
  • The HTTP timeout is now 10s, down from the 100s default, so a sleeping Quest no longer blocks for long.
  • Requests send a User-Agent and Pragma: no-cache header.
  • The root node matches what VRChat expects, and a new AccessValues enum was added.
  • Dispose no longer throws if the mDNS service isn't running.

📦 Dependencies

  • Serilog 4.4.0, PolySharp 1.16.0, System.Text.Json 10.0.12 (netstandard2.1)

🔧 Other

  • New test suite (TUnit).
  • Packages are published to NuGet automatically when a tag is pushed.

Migrating

- using OscQueryLibrary;
+ using OscQueryLibrary.VRChat;

- var server = new OscQueryServer("MyApp", IPAddress.Loopback);
- await server.FoundVrcClient.SubscribeAsync(OnFound);
+ var server = new VrOscQueryServer("MyApp", IPAddress.Loopback);
+ await server.FoundVrClient.SubscribeAsync(OnFound);

Full changelog: 1.2.0...2.0.0