mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-11 08:06:41 +02:00
experimental: turn on tcp::no_delay
This commit is contained in:
parent
d8ebc5e372
commit
8b9b94919c
1 changed files with 7 additions and 0 deletions
|
@ -348,6 +348,13 @@ void StreamServer::handleAccept(socket_ptr socket)
|
|||
tv.tv_usec = 0;
|
||||
setsockopt(socket->native_handle(), SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv));
|
||||
setsockopt(socket->native_handle(), SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv));
|
||||
|
||||
/// experimental: turn on tcp::no_delay
|
||||
// asio::ip::tcp::no_delay option;
|
||||
// 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;
|
||||
shared_ptr<StreamSession> session = make_shared<StreamSession>(this, socket);
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue