YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.snapcast.client.ServerControl Class Reference

The few calls on the control port of the server that the client makes: read the status (to show which group and stream the phone is in) and, on the owner's request, move the phone's group to another stream. More...

Collaboration diagram for de.yaacc.snapcast.client.ServerControl:
Collaboration graph

Classes

enum  MoveResult
 What became of a request to move the group of this client. More...
 

Static Public Member Functions

static ServerSays fetch (InetAddress address, String clientId)
 Server.GetStatus, read for this client id; ServerSays#unreachable when the call fails.
 
static MoveResult moveGroup (InetAddress address, String clientId, String shownGroupId, String streamId)
 Group.SetStream: the group of this client plays this stream.
 

Static Public Attributes

static final int CONTROL_PORT = SocketTransport.DEFAULT_PORT
 The control port of Snapcast.
 

Detailed Description

The few calls on the control port of the server that the client makes: read the status (to show which group and stream the phone is in) and, on the owner's request, move the phone's group to another stream.

Each call opens its own short connection to the address the session resolved (nothing is looked up), runs one call with the usual limits of the control library, and closes. Blocking: never call it on the main thread.

Member Function Documentation

◆ moveGroup()

static MoveResult de.yaacc.snapcast.client.ServerControl.moveGroup ( InetAddress address,
String clientId,
String shownGroupId,
String streamId )
static

Group.SetStream: the group of this client plays this stream.

Changes the server: only on the owner's tap, with a confirmation. The status is read again first and the move is made only when this client is still in the group that was shown (the answer on the screen can be 30 s old, and a group that was dissolved or formed anew meanwhile would move whoever is in it now). One connection, two calls.

Parameters
shownGroupIdthe group id of the ServerSays on the screen (raw)
streamIdthe raw id of the chosen stream

Referenced by de.yaacc.snapcast.client.ServerControl.moveGroup().

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: