gen_server, gen_tcp question
Wed Jul 17 21:26:03 CEST 2002
> Yes. Once a connection has been accepted, you pass
> control of that
> socket to a server. (And as Kent said, make sure you
> handle possible
> incoming packets which might be sent to this process
> before control has
> been passed).
Yes this is a given, my question would be should the
spawn functionality be in the process that accepts the
connection or somewhere else? Basically how simple
should the accept process be kept?
> More than spawning another process, you would could
> instead spawn a new
> OTP behavior. It all depends on the nature of your
> If you want to allow your server to handle many
> connections, then the
> answer is yes. Otherwise, if you want one server per
> connection, than
> you are better off spawning a new behavior.
I assume that by new behaviour, you intend to spawn a
supervised process that implements the gen_server
behaviour. This would make sense.
Mr. Cesarini, Kent, and everyone else, thanks for all
your help. You have been very generous with a newbie.
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
More information about the erlang-questions