Skip to contentSkip to conversation

ui/vnc: set TCP_NODELAY

PATCH In review Peter Lieven 2 participants 2 messages Sep 5, 2014 – Sep 8, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ui/vnc: set TCP_NODELAY

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.

---
v1->v2: use socket_set_nodelay (Peter)

 ui/vnc.c |    1 +
 1 file changed, 1 insertion(+)
ui/vnc.c +1 -0
index f8d9b7d..0fe6eff 100644
@@ -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);
     }
 }
Signature · 1 line
1.7.9.5
#1 lore raw

Hi,

Quoted 3 lines
     if (csock != -1) {
+        socket_set_nodelay(csock);
         vnc_connect(vs, csock, false, websocket);

Added to vnc patch queue.

thanks,
Gerd