the question is totally rewritten since I have understood that previously it was really unclear. I have created a Java Socket server with threads to accept multiple connection in order to handle php tcp requests. The java server just for the testing purposes it reverse the string supplied from php. Java server is hosted on a ubuntu server and the