server: Turn off Nagle's algorithm
parent
d86af88573
commit
f20ffb5e1e
|
@ -45,6 +45,7 @@
|
|||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/tcp.h>
|
||||
|
||||
#ifdef ENABLE_TLS
|
||||
#include <gnutls/gnutls.h>
|
||||
|
@ -1113,6 +1114,9 @@ static void on_connection(void* obj)
|
|||
goto accept_failure;
|
||||
}
|
||||
|
||||
int one = 1;
|
||||
setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one));
|
||||
|
||||
client->net_stream = stream_new(fd, on_client_event, client);
|
||||
if (!client->net_stream) {
|
||||
nvnc_log(NVNC_LOG_WARNING, "OOM");
|
||||
|
|
Loading…
Reference in New Issue