LibVNC / libvncserver

LibVNCServer/LibVNCClient are cross-platform C libraries that allow you to easily implement VNC server or client functionality in your program.
GNU General Public License v2.0
1.1k stars 482 forks source link

Any other transport protocol for LibVNC? #497

Closed NooshinEghbal closed 10 months ago

NooshinEghbal commented 2 years ago

Hi,

I was wondering if LibVNC could run over any other protocols like QUIC/UDT to avoid the Head-of-Line blocking problem of TCP?

Thanks, Nooshin

bk138 commented 2 years ago

Possibly, but that probably would need some/lotsof work. You can, however, have a look at https://github.com/LibVNC/libvncserver/tree/multicastvnc which uses UDP multicast for the image data.

NooshinEghbal commented 2 years ago

Thanks. I looked into multicastvnc/libvncserver/sockets.c and found where the UDP socket created. But I could not find how you managed reliability using UDP. In other words, in the case of packet loss, how you know to resend it?

bk138 commented 2 years ago

Thanks. I looked into multicastvnc/libvncserver/sockets.c and found where the UDP socket created. But I could not find how you managed reliability using UDP. In other words, in the case of packet loss, how you know to resend it?

There's an overview here and an in-depth discussion here.

RokerHRO commented 2 years ago

But I could not find how you managed reliability using UDP. In other words, in the case of packet loss, how you know to resend it?

It is the very nature of UDP that packets can be lost without the whole system would collaps. And multicast also does not allow re-sending to individual recepients, because the server does not know who listens to it.

In other words: The chosen odecs must be fault tolerant, fit into one UDP packet and I'd say also more often non-incremental screen updates might be necessary to recover quickly from display artifacts caused by loss packets.

I'd favour VNC-over-RTP, so also an RTCP channel exists where clients can report "channel quality" information back to the server.

bk138 commented 10 months ago

Let's consider this a dupe of #394 (which has some fault tolerance built into it).