Difference Between RDP / Terminal Services and VNC Streaming Techniques

As part of a customer support tool, I want to provide some features in order to be able to request viewing / remote control of a desktop session. There are several ways to capture a screen and then transfer it, but I want to learn, in particular, why RDP (Remote Desktop / Terminal Services vs. VNC) differs from others. I use RDP vs VNC just because they seem to use radically different methods to transfer the screen to the client.

If I were to guess, RDP seems to pass blocks of bitmap graphics (say, 100x100px) to build a complete picture (which can be pretty slow), but it seems to send the usual colored shapes / fills or font pattern to the client very quickly . It seems that the VNC is taking giant screen shots, comparing the previous image and passing the changes to the client.

I feel that RDP is a much better and smoother protocol than anything else, so what method does it use to achieve this?

EDIT. Just to clarify, I ask about these graphical methods, in particular, as a method for programming a streaming protocol, and not about which existing product / technology to use to solve this business requirement.

+6
remote-access streaming vnc remote-desktop
source share
2 answers

As you know, they are both very different, how they change. The RDP protocol from MS is and extends the ITU standard (T.128) , which can be purchased on the Internet.

RDP implements many bandwidth saving methods that complement each other and make it very efficient with low bandwidth.

VNC, on the other hand, has very simple compression methods: it will send bitmap blocks that have changed and will use the basic compression types, from RLE to jpeg, to transfer these blocks efficiently.
Unfortunately, it is still pretty wasteful of low bandwidth.

VNC basically does not know the basic graphic primitives used to create the screen. This makes it easy to use on any machine, as it simply tracks changes in the raster screen.
RDP, on the other hand, fits deeper into the Windows API and can optimize its flow based on the minimum amount of information needed to create the same update on the client.

If you want to integrate the features of the remote desktop, you have several options:

  • for RDP, you can use ActiveX, used for web-based remote functions. You may want to take a look at wrapper to integrate it into your own software.
    If you want to delve into this, there is source code available for the rdesktop linux client that connects to Windows machines through RDP.

  • There are a number of open source implementations for VNC.
    FogCreek Copilot actually uses one, and you can get its source as it is built on TightVNC

There are also a number of CodeProject projects on RDP and VNC .

+9
source share

As Renault said, VNC simply sends block-by-block block changes without knowing what content is. RDP is much smarter.

You can check what exactly RDP does from these two specifications:

Protocol Level: http://msdn.microsoft.com/en-us/library/cc240445(PROT.10).aspx

Graphics Level: http://msdn.microsoft.com/en-us/library/cc241537(PROT.10).aspx

I think that the largest RDP profit comes from:

  • Caching The client can store a large number of previously seen blocks, and the server can tell the client how to use them. They are also saved, so when a client connects to a server on which it has already been, it can advertise the blocks it has on disk. Very useful when windows are moving. Also, many parts of windows, such as the title bar, are the same.

  • Line / block drawing. As you may have guessed, RDP has operations for drawing a line, a poly, and a rectangle. With drawing windows, they are used quite a lot.

  • Font drawing. RDP has the ability to send through gylphs for fonts and tell the client to display them.

  • Cursor display. Cursor icons are sent as glyphs. Vnc just uses dot

The biggest ones that come to mind. Section 2.2.7 Features Protocol specification sets for a complete list of drawing functions.

+3
source share

All Articles