Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/pc/protocols/tcpip_host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,15 @@ int tcpipPlatformServer(const char *devPathRead, const char *devPathWrite, void
return X_LINK_PLATFORM_ERROR;
}

// Disable Nagle to reduce latency on the accepted connection
int on = 1;
if(tcpip_setsockopt(connfd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)) < 0)
{
perror("setsockopt TCP_NODELAY (server)");
tcpip_close_socket(connfd);
return X_LINK_PLATFORM_ERROR;
}

// Store the socket and create a "unique" key instead
// (as file descriptors are reused and can cause a clash with lookups between scheduler and link)
*fd = createPlatformDeviceFdKey((void*) (uintptr_t) connfd);
Expand Down
Loading