Simple web application takes the script (can be anything) from the user and using the guacamole stream intercepter we are sending the user data to remote mahcine by opening stream by pipe instructions.
Simple JNA jar listening on the static virtual channel for the scripts input, once receive the script it will be executed and send back the response i.e. write the response to static channel.
Issues we are facing:
1. How do we receive back the response in the machine1 by using the guacamole library? we tried by intercepting the output stream by the index, but output stream filter is always empty.
2. On java script level we are able to get the response data by onpipe() listen method but requirement is to get the response on backend.
Approaches we tried to get the response on the backend:
1. Added our own socket class which implements guacamoleSocket interface and trying to clone the stream.
2. We are able to get the response data on the cloned stream but few response data lose happened and procesing the streams performance got affected.
Please suggest/guide as to what is going wrong and what needs to be corrected?