Nova is coded in C# using the Microsoft .NET Framework 4.0, and utilizes major concepts such as NAT traversal, UDP networking, and mirror drivers.
This is a free and open-source software. You can download the source code here. You will need a program like WinZip to extract the archived ZIP files.
Given modern routers these days, most computers can't simply connect to each other with an IP address. If multiple machines are sharing a single network behind a router, the router will not know which machine to forward the connection request to. Although port forwarding exists to solve this ambiguity, many machines do not have port forwarding enabled, and many users are unwilling or unable to customize port forwarding themselves. UPnP is an application framework that enables applications to configure port forwarding programatically, but UPnP is also deactivated on many modern routers, and requiring users to activate it may frustrate them. Therefore, the solution to this whole mess is NAT traversal, which is essentially the process of bypassing NAT restrictions, and establishing a connection between two computers anywhere in the world. To accomplish this, however, an intermediary server must be set up for clients and servers to rendezvous their communication endpoints and break the NAT restriction barrier. You can read more about our specific method here (advanced), here (simpler), and here (simplest).
I had to choose between TCP and UDP networking for our application. TCP boasts reliability at the cost of speed - what you send is what they get. Packets are guarenteed to be in order, unduplicated, and resent (if lost). The price, however, is congestion - an application can wait up to a few hundred milliseconds waiting for a packet to be re-delivered. That's too much time wasted.
UDP, on the other hand, boasts speed at the cost of reliability. Packets are usually duplicated, lost, and out of order. The programmer is responsible for implementing a solution to these anomalies. UDP's raw speed, however, is amazing. It is much faster than TCP and will not slow down to fix any packet anomalies. We decided to use a trusted UDP networking library to save us the headache of implementing our own. We need UDP's speed for the live control module. Packets need to be streamed as quickly as possible to update the view of the remote screen.
How would one implement the live control module - specifically, the realtime view? Perhaps one would suggest to only transfer the changed pixels. That's a good solution, but how could you do it? Would you take two screenshots and compare the changed pixels? Just capturing the screenshot takes 60 milliseconds using the most streamlined function possible (I tried C#'s Graphics.CopyFromScreen(), BitBlt(), and DirectX's screen capture). Additionally time is wasted comparing each pixel in the image, even when using unsafe code to bypass C#'s unnecessary pixel lock calls. All in all, it took 125 milliseconds to produce a screenie. 125 milliseconds to capture the entire desktop, compare each pixel, and produce a sendable byte array. This is terribly inefficient, especially if your friend decides to go get a cup of coffee, and leaves your application to blissfully capture the same desktop screen over and over again.
The solution? A mirror driver. This device mirrors every drawing operation on your screen. So if type the letter 'a', the screen will draw that letter, and the mirror driver will automatically receive the location and size of that 'a', as well as the new pixels. This eliminates the need to capture the screen and compare pixels. The new screen pixels are literally handed to the mirror driver instantaneously. You can then communicate with the mirror driver to obtain this information, and send it. No hassle. If your friend decides to go get a cup of coffee, the mirror driver will not pick up any changed pixels, and your application can 'rest'. I found a reliable mirror driver - the same one TightVNC uses. You can check it out on the Credits page.