leave no_delay option default

This commit is contained in:
badaix 2016-11-10 09:14:13 +01:00
parent 60ed5b46d4
commit 756dd428f0
6 changed files with 7 additions and 10 deletions

View file

@ -354,10 +354,7 @@ void StreamServer::handleAccept(socket_ptr socket)
setsockopt(socket->native_handle(), SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)); setsockopt(socket->native_handle(), SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));
/// experimental: turn on tcp::no_delay /// experimental: turn on tcp::no_delay
// asio::ip::tcp::no_delay option; // socket->set_option(tcp::no_delay(true));
// socket->get_option(option);
// logE << "no_delay: " << option.value() << "\n";
socket->set_option(tcp::no_delay(true));
logS(kLogNotice) << "StreamServer::NewConnection: " << socket->remote_endpoint().address().to_string() << endl; logS(kLogNotice) << "StreamServer::NewConnection: " << socket->remote_endpoint().address().to_string() << endl;
shared_ptr<StreamSession> session = make_shared<StreamSession>(this, socket); shared_ptr<StreamSession> session = make_shared<StreamSession>(this, socket);

View file

@ -71,7 +71,7 @@ void AirplayStream::onStderrMsg(const char* buffer, size_t n)
string logmsg = trim_copy(string(buffer, n)); string logmsg = trim_copy(string(buffer, n));
if (logmsg.empty()) if (logmsg.empty())
return; return;
logO << "(" << exe_ << ") " << logmsg << "\n"; logO << "(" << getName() << ") " << logmsg << "\n";
if (logmsg.find("Is another Shairport Sync running on this device") != string::npos) if (logmsg.find("Is another Shairport Sync running on this device") != string::npos)
{ {
logE << "Seem there is another Shairport Sync runnig on port " << port_ << ", switching to port " << port_ + 1 << "\n"; logE << "Seem there is another Shairport Sync runnig on port " << port_ << ", switching to port " << port_ + 1 << "\n";

View file

@ -21,13 +21,13 @@
#include "processStream.h" #include "processStream.h"
/// Starts shairport-sync and reads and PCM data from stdout /// Starts shairport-sync and reads PCM data from stdout
/** /**
* Starts librespot, reads PCM data from stdout, and passes the data to an encoder. * Starts librespot, reads PCM data from stdout, and passes the data to an encoder.
* Implements EncoderListener to get the encoded data. * Implements EncoderListener to get the encoded data.
* Data is passed to the PcmListener * Data is passed to the PcmListener
* usage: * usage:
* snapserver -s "airplay:///shairport-sync?name=Airplay[&devicename=Snapcast]" * snapserver -s "airplay:///shairport-sync?name=Airplay[&devicename=Snapcast][&port=5000]"
*/ */
class AirplayStream : public ProcessStream class AirplayStream : public ProcessStream
{ {

View file

@ -126,7 +126,7 @@ void ProcessStream::onStderrMsg(const char* buffer, size_t n)
{ {
string line = trim_copy(string(buffer, n)); string line = trim_copy(string(buffer, n));
if ((line.find('\0') == string::npos) && !line.empty()) if ((line.find('\0') == string::npos) && !line.empty())
logO << "(" << exe_ << ") " << line << "\n"; logO << "(" << getName() << ") " << line << "\n";
} }
} }

View file

@ -100,7 +100,7 @@ void SpotifyStream::onStderrMsg(const char* buffer, size_t n)
(logmsg.find('\0') == string::npos) && (logmsg.find('\0') == string::npos) &&
(logmsg.size() > 4)) (logmsg.size() > 4))
{ {
logO << "(" << exe_ << ") " << logmsg << "\n"; logO << "(" << getName() << ") " << logmsg << "\n";
} }
} }

View file

@ -22,7 +22,7 @@
#include "processStream.h" #include "processStream.h"
#include "watchdog.h" #include "watchdog.h"
/// Starts librespot and reads and PCM data from stdout /// Starts librespot and reads PCM data from stdout
/** /**
* Starts librespot, reads PCM data from stdout, and passes the data to an encoder. * Starts librespot, reads PCM data from stdout, and passes the data to an encoder.
* Implements EncoderListener to get the encoded data. * Implements EncoderListener to get the encoded data.