tcp socket data exchange