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

A stream source of the kind tcp in server mode (issue #330, task 2.4): the server listens on a port and one producer connects and pushes raw PCM (no header). More...

Inheritance diagram for de.yaacc.snapcast.server.TcpStreamSource:
Inheritance graph
Collaboration diagram for de.yaacc.snapcast.server.TcpStreamSource:
Collaboration graph

Public Member Functions

 TcpStreamSource (StreamPipeline pipeline, int port, Predicate< InetAddress > accept, MicroClock clock)
 
void start () throws IOException
 Binds the port now, so that a taken port fails at once (as snapserver does when a stream is added).
 
int port ()
 The port that is bound, or -1.
 
void close ()
 

Detailed Description

A stream source of the kind tcp in server mode (issue #330, task 2.4): the server listens on a port and one producer connects and pushes raw PCM (no header).

The server reads in real time like snapserver: after each chunk it waits until the chunk is over, so a producer that is ahead is slowed by TCP and nothing piles up; the receive buffer is small for the same reason. Only addresses the filter allows are served (rule S2), one producer at a time (a second is closed at once), and a producer that sends nothing for 30 seconds is let go (rule S3).


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