There are a few ways you could solve this problem.I understand from your diagram and question your one of your client say client 1 is the server and your server is actually a proxy to redirect connections.The following solutions are in order of their complexity.
First is a networking solution: If connectivity between client 1 and client 2 is all you need to achieve. All you need to do in your clients is to add a route to the other client,add a route to client 1 to reach client 2 and vice versa.you do not have to change design of your program.
Second is a web proxy server:If you are running a web server in your server then you can configure web server to act as a reverse proxy.(Apache proxy instructions).This is useful if you do not have a lot of control over networking but have administrative privilege to your servers
Third is a programming solution:I guess you have the right solution in mind to write a program to "forward" the packets to the client.This is called proxy server so what proxy will do is receive requests from the client forward it to the server and receives the response from the server and forwards it to the client.But this does not guarantee performance you might have some performance issue.I would choose this way only when I have privileges that will allow me to change only the application I wrote and have restricted access to networking or servers and I will absolutely avoid going this road If at all possible for production systems.
Your statement about Java not having nice web socket is not true, Java's socket API is probably one of the most useful sockets out there.