Added test codes for TCP connection.