first draft of two way tcp communication

Only a draft implementation try not to concentrate on cout too much :)