|
YAACC - UPNP Client and Server
|
The control port of the built-in server (issue #330, task 3.2), by default 1705: the listener, the filter of addresses (rule S2, nothing is read before it passed), at most maxConnections at a time (S3), and the hub that sends notifications to the open connections.
More...


Public Member Functions | |
| ControlServer (SnapcastServer server, Predicate< InetAddress > accept, int maxConnections) | |
| ControlServer (SnapcastServer server, Predicate< InetAddress > accept, int maxConnections, java.util.function.Supplier< String > defaultCodec) | |
| void | setOnChange (Runnable onChange) |
| Called whenever notifications of a change go out: the state changed (the service persists it). | |
| synchronized void | start (int port) throws IOException |
| int | port () |
| ControlSession | open (java.io.InputStream in, java.io.OutputStream out, java.io.Closeable closer) |
| Adds a connection that is not a socket (in process): its streams and what closes it. | |
| void | broadcast (List< JSONObject > notifications, ControlSession origin) |
Sends the notifications to every control connection except origin (null: to all). | |
| void | ended (ControlSession session) |
| void | close () |
Public Member Functions inherited from de.yaacc.snapcast.server.ControlSession.Hub | |
The control port of the built-in server (issue #330, task 3.2), by default 1705: the listener, the filter of addresses (rule S2, nothing is read before it passed), at most maxConnections at a time (S3), and the hub that sends notifications to the open connections.
Connections that do not come over a socket (the app's own, in process) join through open.
| de.yaacc.snapcast.server.ControlServer.ControlServer | ( | SnapcastServer | server, |
| Predicate< InetAddress > | accept, | ||
| int | maxConnections, | ||
| java.util.function.Supplier< String > | defaultCodec ) |
| defaultCodec | the codec of a stream that is added without one |

| void de.yaacc.snapcast.server.ControlServer.broadcast | ( | List< JSONObject > | notifications, |
| ControlSession | origin ) |
Sends the notifications to every control connection except origin (null: to all).
Implements de.yaacc.snapcast.server.ControlSession.Hub.
Referenced by de.yaacc.snapcast.server.ControlServer.ControlServer().

| void de.yaacc.snapcast.server.ControlServer.ended | ( | ControlSession | session | ) |
Implements de.yaacc.snapcast.server.ControlSession.Hub.
| ControlSession de.yaacc.snapcast.server.ControlServer.open | ( | java.io.InputStream | in, |
| java.io.OutputStream | out, | ||
| java.io.Closeable | closer ) |
Adds a connection that is not a socket (in process): its streams and what closes it.
Starts its thread.