TCP proxy using gen_server tutorial (Part 1)
Jay Nelson
jay@REDACTED
Mon Mar 17 16:44:39 CET 2003
Vlad Dumitrescu (EAW) wrote:
> > I think you meant to register with the name of the service module, in
> this case echo?
Yes.
> > * trap_exits has to be set on the gen_server process, and that means
> for example in tcp_proxy:init.
I had put it in start_link which was the calling
process so that explains why it didn't work.
> > * in handle_info({'EXIT' : the result of spawn_link should be stored in
> a Pid2
Good catch! I missed this one completely.
> > * Here I'm not sure either how to do it.
I can run over the list of clients and kill them, but I'm not sure
I want to. In my case, they are short-lived http requests so I
will just let them run.
Thanks, the changes have been made and updated in the tutorial and code.
Hopefully this week I'll get a few hours to finish up Part 2.
jay
More information about the erlang-questions
mailing list