Create tcp socket and connect to stdin/out