Open camegone opened 1 year ago
A couple of more minor documentation issues I noticed to add on to this (let me know if I should open these as separate issues). Also, a disclaimer as I'm a novice at C# development, I'm mostly experienced with Java but the only Java OSCQuery implementation I could find was never fully implemented.
I did try implementing OSCQuery myself using the jmDNS library for the mDNS portion, but VRChat would never seem to recognize my service. So, I would also like to see it clarified what VRChat is looking for when finding eligible services. The main two differences I noticed in my service and what the vrc-oscquery-lib creates is that the address was my machine's internal IP address instead of 127.0.0.1 (even though these are effectively the same), and that my service was just under the "local" domain instead of "osc.local" or "oscjson.local". I could not find a way in the jmDNS library to change either of these in my advertised service.
var myGoodService = new OSCQueryServiceBuilder() // First, modify class' properties. .WithTcpPort(Extensions.GetAvailableTcpPort()) .WithUdpPort(Extensions.GetAvailableUdpPort()) .WithServiceName("MySuperDuperService") // Then activate server with this function .WithDefaults() .Build();
this needs to be more well known, spent actual hours trying to get this to work only to find out this was the issue, please fix this or make it more obvious in documentation.
The WithDefaults() method actually activates http server and not change server name and ports configuration, while its name suggest "just set default values for later activation". So, in current library, this code is wrong (this one is similar to the example code in Getting started Doc.):
... and this is the version works fine: