Netcat#

apt-get install netcat-openbsd

Server:

nc -kl 1234
-l

listen for an incoming connection

-k

stay listening for another connection after its current connection is completed.

Client:

echo hi | nc $server_ip 1234