qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ui/vnc: set TCP_NODELAY


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] ui/vnc: set TCP_NODELAY
Date: Tue, 2 Sep 2014 10:36:40 +0100

On 2 September 2014 10:21, Peter Lieven <address@hidden> wrote:
> 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
> this 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 <address@hidden>
> ---
>  ui/vnc.c |    4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/ui/vnc.c b/ui/vnc.c
> index 1bc1ae0..b12d0ea 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -2885,6 +2885,10 @@ static void vnc_listen_read(void *opaque, bool 
> websocket)
>      }
>
>      if (csock != -1) {
> +#ifdef TCP_NODELAY
> +        int flag = 1;
> +        setsockopt(csock, IPPROTO_TCP, TCP_NODELAY, (char *) &flag, 
> sizeof(int));
> +#endif
>          vnc_connect(vs, csock, false, websocket);

Why not just call socket_set_nodelay() ?

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]