async accept in handle_info?

Martin J. Logan <>
Fri Jul 16 18:15:17 CEST 2004

On Fri, 2004-07-16 at 10:26, Jimmy Olgeni wrote:
> Hi there,
> I see that I can define "handle_info ({ tcp, Socket, Data }" and read 
> TCP data from a gen_server or gen_fsm, but is there a way to handle 
> socket accept operations this way? Or should I stick with using a 
> separate acceptor process?

I take it that your set up goes like this;

(Acceptor) ----on accept spawn worker and go back to accepting---->

What about using something like;

(listener) ----spawn acceptor --> (acceptor) <upon accepting tell the
listening to spawn a new acceptor>

More information about the erlang-questions mailing list