Let\'s say Java has two kind of sockets:
Imagine the situation of two
Why do we need a middle server? If you just want to expose VNCServer. Why not try an architecture like following
VNCServer(S) <-> (C)MyApp(S) <-> (C) User
(S) represents a server socket
(C) represents a client socket
In this case MyApp acts both as a client (for VNCServer) and as a server(for User). So you will have to implement both client and server sockets in MyApp and then relay the data.
Edit: To communicate with VNCServer, MyApp needs to know the IP of the VNCServer. User will only be communicating with MyApp and only needs to know MyApp's IP Address. User doesn't need VNCServer's ip address.