I am a beginner in socket programming. I wrote a sample program to echo the contents received from the client.
This programs opens a server socket and waits for client connection. "testThread" is used to serve multiple clients. For each client a seperate thread is spawn to echo the contents. The code for that thread is
The client program is there will be many clients like this.
Running this code produces the following output for Server
Once the data is written at the client side the server is not picking this data and echoing it back.
Please revise your display name to meet the JavaRanch Naming Policy. To maintain the friendly atmosphere here at the ranch, we like folks to use real (or at least real-looking) names, with a first and a last name.