=client reads line from standard input (inFromUser stream) , sends to server via socket (outToServer stream)
=server reads line from socket
=server converts line to uppercase, sends back to client
=client reads, prints modified line from socket (inFromServer stream)

i just want to know how the code for server and client run on command prompt (cmd) of this above example.

We do not provide ready source code. Show what you have so far. You didn't even specify the language you're using.

I did this a while back as an exercise in vb.net. If that's your language then perhaps I can help you through it (but show some effort first).

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.