How to use Telnet to test TCP connections