Allow passive mode
jeanparpaillon opened this issue · comments
Hi,
Allowing a passive mode would be a great feature. Is there any plan to support it ?
Jean
On Tue, Jul 08, 2014 at 06:50:24AM -0700, Jean Parpaillon wrote:
Hi,
Allowing a passive would be a great feature. Is there any plan to support it ?
Depending on the type of socket, you should be able to do something
similar to passive reads right now. For tcp/udp sockets, it's simple
(pass the fd into gen_tcp/gen_udp).
For other sockets types, you can try inert:
https://github.com/msantos/inert
inert is a driver that uses the erts event loop to poll the file
descriptor and sends the process a message when the fd is ready.
inert is probably still a bit too "low level" compared to the inet
passive mode. For example, the caller has to check still for {error,
eagain} (it's possible for the event loop to return a ghost event).
Thanks for the feedback and let me know if any of this wasn't clear or
if you have any suggestions!
Thank you very much, inert makes the job !