Implemented TCP connection