Wondering on active TCP socket

Kaiduan Xie <>
Thu Aug 12 15:51:08 CEST 2010


Hi, all,

>From Joe's book,

"Once an active socket has been created, the controlling process will
be sent {tcp, Socket, Data} messages as data is received. There
is no way the controlling process can control the flow of these
messages. A rogue client could send thousands of messages to
the system, and these would all be sent to the controlling process.
The controlling process cannot stop this flow of messages."

"This process cannot control the flow of messages to the server loop.
If the client produces data faster than the server can consume this
data,
then the system can be flooded with messages—the message buffers will
fill up, and the system might crash or behave strangely."

For this case, I think that the flow control of underlying OS TCP
stack will kick in, and the sender can not send more packets. How the
system can be flooded with messages in erlang?

Can someone elaborate more on this point?

Thanks,

Kaiduan


More information about the erlang-questions mailing list