gen_tcp:accept/{1,2} in passive mode?
Samuel Tardieu
sam@REDACTED
Mon Dec 4 20:04:54 CET 2000
I use gen_tcp:accept{1,2} a lot when doing servers, and I don't like the
fact that I cannot passively wait for connections, in a gen_server for example.
How do you deal with code change and a process being blocked in an accept
call? You can always use a timeout, but in this case you generate some
load when you exit the timeout just in case code needs to be changed.
Wouldn't it be possible to set the accepting socket in passive mode, and
receive a message {Port, {accept, NewSocket, Origin}} for example when
a new connection arrives?
Sam
More information about the erlang-questions
mailing list