need java program to copy the contents typed in client to server in same computer with different ports for both.

jasimp commented: start writing it then -2

I should point out that at this forum we are helping people to solve they programming errors not to do their full homeworks/projects.

Open a socket , read at server end , write at client end , you will not get a simple homework than this .

Open a socket , read at server end , write at client end , you will not get a simple homework than this .

Pretty much, especially since the Client connects to the server at a different port (called the HandShake point) so that the Server can accept connections from other Clients.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.