[erlang-questions] How to write a TCP server in Erlang?

Hubert Matthews erlang@REDACTED
Sat Jun 16 17:45:44 CEST 2007

Ulf Wiger (TN/EAB) wrote:
> Changing the server from {active,false} to {active,true} and doing
> a message trace on it, I can clearly see the 10 incoming messages
> and then the close, if I have a delay inserted between the
> messages. Without the delay, the close comes directly after the
> first message, which btw is the concatenation of all 10 (short)
> messages.

TCP is a stream protocol and has no idea of packets.  It is the
application that determines framing, not TCP.  If you want packets as
separate messages then use UDP.

Hubert Matthews         http://www.oxyware.com/
Software Consultant     hubert@REDACTED

More information about the erlang-questions mailing list