API Discovery - RiftCat/vridge-api GitHub Wiki
If you want your app to automatically locate running VRidge server on the LAN, you may want to listen for API discovery broadcasts.
Simple usage
Call static property/method:
C#: VridgeRemote.ActiveVridgeServers.FreshServers
Java: VridgeRemote.getVridgeServers()
This will return a list of servers with following string fields for each found server:
- MachineName - PC name
- UserName - Windows user name
- HumanReadableVersion - current version of PC Vridge server
- Endpoint - network address used by PC app to listen for API clients
This will only contain servers that were active in last 5 seconds, checked every second.
Advanced usage
To manually listen for raw discovery beacons, you need to bind UDP listener to port 38219 and decode received frames as protobuf-formatted Beacon message:
message Beacon {
optional BeaconOrigin Role = 1 [default = Server];
optional string MachineName = 2;
optional string UserName = 3;
optional string HumanReadableVersion = 4;
}
enum BeaconOrigin {
Server = 0;
Client = 1;
}