You can use netcat or nc as a debugging TCP tool. It can be a TCP sender and receiver with a short session (auto close when connection is closed)
Examples :
Scan ports
$ nc -zv 127.0.0.1 20-80Check redis status
$ echo 'info' | nc 127.0.0.1 6379Retrieve http response
$ printf "GET /xinchao HTTP/1.1\r\n\r\n" | nc 127.0.0.1 8000 | tee xinchao.txtChange to IPv6 : nc -6
Want more ??
$ nc -h