HELP on Tcp message exchange

I need some help, I want to implement text based message exchange between a
tcp client and server.
I need help for the exchange of messages and how the text messages apear
both on client and server and messages send both from client and server.