Do you use any packet-option on the socket. Otherwise you don't have any guarantee that you will receive all the echoed data in one message. That is, you will send more data than you receive as you have a 1-to-1 relation between send and receive in your loop. /Sverker, Erlang/OTP Ericsson