Note that there are some explanatory texts on larger screens.

plurals
  1. USVardhaman
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COHi Peter, Thank you for the response. I am trying to connect from a web application to another server(Socket server) which supports one connection. The socket server supports one connection from WEB , that means once the connection is open its should not close for any request. So my doubts is how can I keep this connection alive for n request & then handle the same getting response for that request it self? (Synchronize it) Also what if I have two application accessing the same Socket server (How do I maintain one connection)? What if the web system get clustered?
      singulars
    2. COThank you, But in my case say client Connection time out is 30 secs, so how will I handle this in case say there are multiple request send & I dont get response for 30 secs then suddenly I get the response so for one of the request all the data (response) will be accumalated. Also if I don't close the connection the number of process for that socket will be open, & may lead to heap.
      singulars
    3. CO*/ public String getServerResponse(int len){ int i = 1; String getfep = null; //Get response try { this.in = socket.getInputStream(); int dataInt = this.in.read(); byte[] buf = new byte[4096]; int bytesRead; while( (bytesRead = in.read(buf)) != -1 ) { System.out.print(","+i+"--"+bytesRead); i++; } System.out.print("End Of loop"); } catch (IOException e) { BVLog.error(5,"IOException Exception for the FEP Socket while getting message-->"+e.getMessage()); BVLog.printStackTrace(5, e); } return getfep.toString(); }
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload