The Structure of a Network Server
The Structure of a Network Server
Most network servers have a similar architecture. First they create a listening socket that listens for incoming connection. They then enter an accept state in which they loop until termination, accepting each new connection as it arrives and starting the real client/server work.
Read More:
http://20bits.com/2008/06/16/erlang-a-generalized-tcp-server/
Thanks