gen_server, gen_tcp question

Eric Merritt cyberlync@REDACTED
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
> application.
  ..[snip]..
> 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.

Thanks,
Eric

__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com



More information about the erlang-questions mailing list