<div dir="ltr"><div>
Andreas, do you have a wrapper module or some code you can share?</div><div>I'm trying to replace a gen_udp server with the socket module.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 29, 2019 at 7:18 PM Ingela Andin <<a href="mailto:ingela.andin@gmail.com">ingela.andin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi!<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Den ons 27 mars 2019 kl 08:20 skrev Andreas Schultz <<a href="mailto:andreas.schultz@travelping.com" target="_blank">andreas.schultz@travelping.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="color:rgb(33,33,33);font-size:13px">Hi,</div><div style="color:rgb(33,33,33);font-size:13px"><br></div><div style="color:rgb(33,33,33);font-size:13px">Is a {active, N} like delivery of data planed for the new socket or will polling the recv methods be the only way the receive data? What about non-blocking connect and accept?</div><div style="color:rgb(33,33,33);font-size:13px"><br></div></div></blockquote><div><br></div><div>It is planned to have behaviours that implement the active behaviour but not as part of the socket module. The socket module should be the primitives. <br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="color:rgb(33,33,33);font-size:13px"></div><div style="color:rgb(33,33,33);font-size:13px">My preference would be to get an active notification when data is available for receive and another one when when a non-blocking write is possible. Sending and reception should then be left to the caller.</div><div style="color:rgb(33,33,33);font-size:13px">Same goes for non-block accept and connect. Call accept/connect with a async option and get some message when the procedures finishes.</div><div style="color:rgb(33,33,33);font-size:13px"><br></div><div style="color:rgb(33,33,33);font-size:13px">I do realize that all this could be build with a gen_server/gen_statem around socket, so I guess the real question is does it make sense to start build such a wrapper or are the plans to make async functions part of the socket module?</div><div style="color:rgb(33,33,33);font-size:13px"><br></div></div></blockquote><div><br></div><div>Maybe Michael will have some more comments.<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div style="color:rgb(33,33,33);font-size:13px"></div><div style="color:rgb(33,33,33);font-size:13px">Thanks</div><div style="color:rgb(33,33,33);font-size:13px">Andreas</div></div>-- <br><div dir="ltr"><div dir="ltr"><span style="font-family:monospace,monospace">-- <br>Dipl.-Inform. Andreas Schultz<br><br>----------------------- enabling your networks ----------------------<br>Travelping GmbH Phone: +49-391-81 90 99 0<br>Roentgenstr. 13 Fax: +49-391-81 90 99 299<br>39108 Magdeburg Email: <a href="mailto:info@travelping.com" target="_blank">info@travelping.com</a><br>GERMANY Web: <a href="http://www.travelping.com" target="_blank">http://www.travelping.com</a><br><br></span><div><span style="font-family:monospace,monospace">Company Registration: Amtsgericht Stendal Reg No.: HRB 10578</span></div><span style="font-family:monospace,monospace">Geschaeftsfuehrer: Holger Winkelmann VAT ID No.: DE236673780<br>---------------------------------------------------------------------</span></div></div>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div></div>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>