Sample application to create socket connection and send/ receive data. I am using https://packetsender.com/ for testing the same.
PS: Not much error handling done, this is my trial.
Packet sender has a quick time out, so please make sure the Persistent TCP
box is checked