Skip to content

Commit

Permalink
PINE: Disable nagle buffering
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Jul 21, 2024
1 parent cc667cd commit 3172eac
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/core/pine_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,16 @@ PINEServer::PINESocket::~PINESocket() = default;

void PINEServer::PINESocket::OnConnected()
{
INFO_LOG("PINE: New client at {} connected.", GetRemoteAddress().ToString());
INFO_LOG("New client at {} connected.", GetRemoteAddress().ToString());

Error error;
if (GetLocalAddress().IsIPAddress() && !SetNagleBuffering(false, &error))
ERROR_LOG("Failed to disable nagle buffering: {}", error.GetDescription());
}

void PINEServer::PINESocket::OnDisconnected(const Error& error)
{
INFO_LOG("PINE: Client {} disconnected: {}", GetRemoteAddress().ToString(), error.GetDescription());
INFO_LOG("Client {} disconnected: {}", GetRemoteAddress().ToString(), error.GetDescription());
}

void PINEServer::PINESocket::OnRead()
Expand Down

0 comments on commit 3172eac

Please sign in to comment.