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

Announces this phone as a Sendspin server by mDNS (spec, "Client Initiated Connections"): the service type {@value SendspinServiceType.SERVER_TYPE} on the port of the listener, with the TXT records path (required) and name. More...

Collaboration diagram for de.yaacc.sendspin.discovery.SendspinServerAdvert:
Collaboration graph

Public Member Functions

 SendspinServerAdvert (Context context)
 
synchronized void register (String instanceName, String displayName, String path, int port)
 Registers the service.
 
synchronized void register (String instanceName, String displayName, String path, int port, String yaacc)
 As above, with the yaacc id that joins the announcements of this phone's player and server (null: none).
 
synchronized void register (String serviceType, String instanceName, String displayName, String path, int port)
 As above, for another service type: SendspinServiceType#TYPE announces a player (the phone as a player).
 
synchronized void register (String serviceType, String instanceName, String displayName, String path, int port, String yaacc)
 
synchronized void unregister ()
 Ends the announcement.
 

Detailed Description

Announces this phone as a Sendspin server by mDNS (spec, "Client Initiated Connections"): the service type {@value SendspinServiceType.SERVER_TYPE} on the port of the listener, with the TXT records path (required) and name.

A client that does not announce itself finds the phone this way and connects to it. Opt-in (the user's switch), and only while the listener runs. The instance name is the id of this server. The Android part only: what is announced and when is decided by the hub.

Member Function Documentation

◆ register()

synchronized void de.yaacc.sendspin.discovery.SendspinServerAdvert.register ( String instanceName,
String displayName,
String path,
int port )

Registers the service.

Does nothing if it is registered already.

Parameters
instanceNamethe DNS-SD instance name (the id of this server: at most 63 bytes)
displayNamethe name of the TXT record
paththe path of the TXT record, the one the listener serves

Referenced by de.yaacc.sendspin.discovery.SendspinServerAdvert.register(), de.yaacc.sendspin.discovery.SendspinServerAdvert.register(), and de.yaacc.sendspin.discovery.SendspinServerAdvert.register().

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

◆ unregister()

synchronized void de.yaacc.sendspin.discovery.SendspinServerAdvert.unregister ( )

Ends the announcement.

Safe to call when nothing is registered.


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