Recently, I've been collaborating on a web-based virtual machine interface to qemu over its VNC interface. The latest prototype uses node.js for the socket.io library, which provides an abstract, portable, and efficient interface for passing messages between a browser and web server. In order to bring down latency, I needed a way to decode the RFB protocol, but node.js is asynchronous, so I couldn