|
|
| SendspinDirectory (MonotonicClock clock, long graceMillis) |
| |
|
void | addListener (Listener listener) |
| |
|
void | removeListener (Listener listener) |
| |
| boolean | serviceFound (String serviceId, String serviceName, InetAddress address, int port, SendspinServiceTxt txt) |
| |
|
void | serviceLost (String serviceId) |
| | The platform says the service is gone: it is listed for the grace period still.
|
| |
|
void | discoveryRestarted () |
| | A new scan starts: what the earlier one found and the new one does not announce again is gone after the grace period (a browse only reports the loss of services it has seen itself).
|
| |
|
void | clear () |
| | The scan ended (switched off): what it found is forgotten.
|
| |
|
List< Entry > | snapshot () |
| | The players, one per endpoint, sorted by name and address; services past their grace period are dropped first.
|
| |
The Sendspin players the network announced (mDNS _sendspin._tcp), as the last scan left them.
Announcements are not authenticated, so what is accepted is limited: only addresses of the local network (no loopback, no public address, as for the other discovered devices), a port of 1024 or more, a path that is path-absolute, at most {@value MAX_DISCOVERED} players. A service that disappears stays listed for a grace period (announcements flap), then goes. Pure; the platform calls and the connections are elsewhere. Thread safe; listeners are told outside the lock.