Here's another one. See tcpserver and tcpclient here: http://cr.yp.to/ucspi-tcp.html I think tcpserver handles all the socket stuff for you and you can just write your program using stdin and stdout. Also, the other tcp tools on that page (scroll down) might be useful.