[erlang-questions] Re: about a tcp question in erlang

Jack Moffitt <>
Tue Mar 29 06:24:19 CEST 2011


> I want to know, when a client send a message("helloworld") to server, then send another message("helloworld2"). How many messages will the server receive? (I guess 2.)  If the client send very fast, or the message is big enough, how the situation again?

With {active, true} the client can overflow your receiver. If you want
flow control, you can use {active, once} and then reset the socket
option after every receive, which will allow another message to come
through. From what I've seen, {active, once} is the standard setup for
TCP sockets in Erlang.

jack.



More information about the erlang-questions mailing list