Lots of advice here: Link to a very basic tutorial about TCP (evolved to: TCP-socket democode to send / receive data / characters similar to serial