|
YAACC - UPNP Client and Server
|
Turns the endpoint of a snapserver into the InetAddress a connection uses.
More...

Classes | |
| interface | Lookup |
The lookup of a name; InetAddress#getByName in the app, a fake in a test. More... | |
Public Member Functions | |
| Resolver (Lookup lookup, long timeoutMillis) | |
| InetAddress | resolve (ServerEndpoint endpoint) throws IOException |
Static Public Member Functions | |
| static Resolver | system () |
| The resolver of the app: the system's name lookup with a limit of 5 seconds. | |
Turns the endpoint of a snapserver into the InetAddress a connection uses.
A discovered server and an IP literal have their address already and are never looked up. A host name (a manual entry) goes to the system resolver, which has no time limit of its own: here the lookup runs on a helper thread and the caller waits at most timeoutMillis, so the reader thread of a connection is never held by a slow or hanging resolver. At most MAX_HELPERS lookups are under way at once (a hanging one keeps its thread until the resolver returns); more are refused at once, so repeated attempts cannot pile up threads. An answer that is unspecified or multicast is refused. Errors carry no host name or address in their text.
| InetAddress de.yaacc.multiroom.discovery.Resolver.resolve | ( | ServerEndpoint | endpoint | ) | throws IOException |
| IOException | when the name does not resolve in time, the resolver is busy, or the address is unusable |
Referenced by de.yaacc.fcast.discovery.FCastHub.newAddReceiver(), and de.yaacc.snapcast.ResolvingTransport.open().
