diff mbox

[PULL,1/2] ui/vnc: set TCP_NODELAY

Message ID 1411022036-17668-2-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann Sept. 18, 2014, 6:33 a.m. UTC
From: Peter Lieven <pl@kamp.de>

we currently have the Nagle algorithm enabled for all outgoing VNC updates.
This may delay sensitive updates as mouse movements or typing in the console.
As we currently prepare all data in a buffer and then send as much as we can
disabling the Nagle algorithm should not cause big trouble. Well established
VNC servers like TightVNC set TCP_NODELAY as well.
A regular framebuffer update request generates exactly one framebuffer update
which should be pushed out as fast as possible.

Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/vnc.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/ui/vnc.c b/ui/vnc.c
index f8d9b7d..0fe6eff 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2914,6 +2914,7 @@  static void vnc_listen_read(void *opaque, bool websocket)
     }
 
     if (csock != -1) {
+        socket_set_nodelay(csock);
         vnc_connect(vs, csock, false, websocket);
     }
 }