TCP/IP Stream and recv?

Peter Lund <>
Thu Feb 9 09:50:10 CET 2006

Chris Campbell wrote:

>That's true, but {packet, N} assumes the client is trustworthy and
>will send an N byte header containing the number of bytes followed by
>that number of bytes.  If it sends less, the server will time out and
>kill the connection.  If it sends more...
>Anyway, I think I'm getting ahead of myself thinking about
>untrustworthy clients.  I'm only playing at the mo'.
Yes, TCP connections require both ends to talk correctly otherwise it 
wont work. A misbehaving client will simply not get any service by a 
server and if the server detect this it should probably just close down 
the connection. Debugging activity should then focus on the client's 


More information about the erlang-questions mailing list