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

The real FeedConnection: a TCP socket with a small send buffer and TCP_NODELAY. More...

Inheritance diagram for de.yaacc.snapcast.feed.SocketFeedConnection:
Inheritance graph
Collaboration diagram for de.yaacc.snapcast.feed.SocketFeedConnection:
Collaboration graph

Public Member Functions

void write (byte[] data, int offset, int length) throws IOException
 Writes all the bytes; blocks while the peer does not read.
 
void close ()
 Closes the connection; safe to call twice and from another thread.
 
- Public Member Functions inherited from de.yaacc.snapcast.feed.FeedConnection

Static Public Attributes

static final Factory FACTORY = SocketFeedConnection::connect
 Opens real sockets.
 

Detailed Description

The real FeedConnection: a TCP socket with a small send buffer and TCP_NODELAY.

The small send buffer matters: bytes in socket buffers delay a pause or a stop by bytes / bytes-per-second (the feed piled up 39 s of audio in buffers when it did not pace and kept the default sizes).

Member Function Documentation

◆ close()

void de.yaacc.snapcast.feed.SocketFeedConnection.close ( )

Closes the connection; safe to call twice and from another thread.

Implements de.yaacc.snapcast.feed.FeedConnection.

◆ write()

void de.yaacc.snapcast.feed.SocketFeedConnection.write ( byte[] data,
int offset,
int length ) throws IOException

Writes all the bytes; blocks while the peer does not read.

Another thread's close() ends the wait.

Implements de.yaacc.snapcast.feed.FeedConnection.


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