API-referentie

Discover (LAN)

Ontdek andere PlainApp-instanties op het lokale netwerk (LAN/Wi-Fi Aware). Ontdekking is de eerste stap vóór koppeling — zodra een apparaat is ontdekt, roep een koppeling-mutation aan in de sectie Pairing.

Typedefinities

bash
# Discovery uses UDP broadcast on the LAN and (optionally) Wi-Fi Aware.
# Discovered devices are not persisted; call isDiscovering to poll state.
# Use the NearbyViewModel events / WebSocket push channel to receive the
# live list of discovered devices.

Bewerkingen

mutation

startDiscovery

Start het scannen van het lokale netwerk naar PlainApp-peers. Retourneert onmiddellijk; resultaten worden via het WebSocket-gebeurteniskanaal gepusht en getoond in de Nearby-UI.

bash
mutation StartDiscovery {
  startDiscovery
}
mutation

stopDiscovery

Stop een lopende discovery-scan.

bash
mutation StopDiscovery {
  stopDiscovery
}
query

isDiscovering

Of er momenteel een discovery-scan loopt.

bash
query IsDiscovering {
  isDiscovering
}