How titan connect to kvm's vnc through titan server via java object stream

I nearly don’t understand the code I wrote 6 months ago about the vnc connection. It is a little complex, the basic idea is : Titan server create a proxy server to the kvm’s vnc. Titan server is using java object stream to communicate with client, it wrap all the bytes from the object stream to kvm’s vnc server through the proxy server that created by the “proxy” command.

titan proxy server to vnc
titan proxy server to vnc