|
YAACC - UPNP Client and Server
|
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...


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 () |
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).