mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:10:43 +07:00
Set TCP_NODELAY for `WSLProxy` to disable Nagle for interactivity
GitOrigin-RevId: 60995cbab5ab04ec5c1da3904b7311ead1a52aaf
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bd436696e5
commit
e50e14ed8f
Binary file not shown.
@@ -7,6 +7,7 @@
|
||||
#include <pthread.h>
|
||||
#include <strings.h>
|
||||
#include <errno.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
|
||||
// See svg file and wslproxy_test_client.py
|
||||
@@ -56,6 +57,12 @@ static int jb_create_srv_socket(const in_addr_t listen_to, uint16_t *port) {
|
||||
perror("can't open socket");
|
||||
exit(-1);
|
||||
}
|
||||
// Ktor sets it to decrease delay, so do we
|
||||
const int flags = 1;
|
||||
if (setsockopt(sock, SOL_TCP, TCP_NODELAY, (void *) &flags, sizeof(flags)) != 0) {
|
||||
perror("Can't set sock opt");
|
||||
exit(-1);
|
||||
}
|
||||
struct sockaddr_in addr_p = {0};
|
||||
addr_p.sin_family = AF_INET;
|
||||
addr_p.sin_addr.s_addr = listen_to;
|
||||
|
||||
Reference in New Issue
Block a user