YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.fcast.discovery.FCastEndpoint Class Reference

The address of an FCast receiver: a host (a name or an IP literal) and a TCP port, default {@value DEFAULT_PORT}. More...

Collaboration diagram for de.yaacc.fcast.discovery.FCastEndpoint:
Collaboration graph

Public Member Functions

String getHost ()
 
int getPort ()
 
InetAddress getAddress ()
 The address if the host is an IP literal, null for a host name (nothing is looked up here).
 
String toString ()
 The canonical text host:port ([ipv6]:port for IPv6).
 
boolean equals (Object other)
 
int hashCode ()
 

Static Public Member Functions

static FCastEndpoint parse (String text)
 
static FCastEndpoint parseCanonical (String text)
 
static FCastEndpoint fromAddress (InetAddress address, int port)
 

Static Public Attributes

static final int DEFAULT_PORT = 46899
 The TCP port of FCast.
 

Detailed Description

The address of an FCast receiver: a host (a name or an IP literal) and a TCP port, default {@value DEFAULT_PORT}.

Immutable. A thin wrapper of the checked parser that the Snapcast discovery already has (ServerEndpoint, decision D15): strict host[:port] (no scheme, path, white space, zone id or non-ASCII character), nothing is resolved while parsing, an IP literal has one canonical form so that the same receiver found by mDNS and typed in by hand is one receiver. The text of an endpoint is an address of the user's network: show it, never log it.

Member Function Documentation

◆ fromAddress()

static FCastEndpoint de.yaacc.fcast.discovery.FCastEndpoint.fromAddress ( InetAddress address,
int port )
static
Returns
the endpoint of a resolved address, or null if the address is not usable (unspecified, multicast, broadcast)

Referenced by de.yaacc.fcast.discovery.FCastDirectory.serviceFound().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse()

static FCastEndpoint de.yaacc.fcast.discovery.FCastEndpoint.parse ( String text)
static
Returns
the endpoint of host[:port] (the port defaults to {@value DEFAULT_PORT}), or null if the text is not valid

Referenced by de.yaacc.fcast.discovery.FCastStoredReceivers.add(), and de.yaacc.fcast.discovery.FCastEndpoint.parseCanonical().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parseCanonical()

static FCastEndpoint de.yaacc.fcast.discovery.FCastEndpoint.parseCanonical ( String text)
static
Returns
the endpoint for exactly this canonical text (toString() of an endpoint), or null (also for another writing)

Referenced by de.yaacc.fcast.discovery.FCastReceiverId.parse().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: