TCP flow control problem

Nav <>
Sun Jan 30 23:38:22 CET 2011

I have implemented two TCP servers using gen_fsm, and gen_server, respectively.
I am using {active, once} option, after getting each message.

When I try to send data from one side to another in a loop, the data
gets corrupted (first 1 or 2 message arrive ok, but following gets
corrupted) when it arrives at other side.

However, if I put a timer:sleep(1000) before sending each message,
then everything seems to go fast.

What seems to go wrong by sending data too fast? Do I need to set some
more socket options?

Thanks, Nav

More information about the erlang-questions mailing list