<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div tabindex="0" style="outline: none 0px; display: table; width: 1323px; box-sizing: border-box; padding-top: 12px; padding-left: 0px; font-family: "Helvetica Neue", "Segoe UI", Helvetica, Arial, "Lucida Grande", sans-serif; font-size: 13px;" id="yui_3_16_0_ym19_1_1479771400257_821869"><div style="display: table-cell; width: auto; word-wrap: break-word; word-break: break-word;" id="yui_3_16_0_ym19_1_1479771400257_821870"><div id="yui_3_16_0_ym19_1_1479771400257_821871"><div id="yui_3_16_0_ym19_1_1479771400257_821872"><div dir="ltr" id="yui_3_16_0_ym19_1_1479771400257_821873"><div id="yui_3_16_0_ym19_1_1479771400257_821874">> Well, we can try your sverk_tcp on our test installation with  1gbps of input.</div><div id="yui_3_16_0_ym19_1_1479771400257_821875"><br clear="none" id="yui_3_16_0_ym19_1_1479771400257_821876"></div><div dir="ltr" id="yui_3_16_0_ym19_1_1479771400257_821877">> But I'm a bit afraid of blocking connect. <br><br>I would be interested in this.  Also the connect does not block if you apply the changes Sverker mentioned:</div><div dir="ltr" id="yui_3_16_0_ym19_1_1479771400257_821877"><br>"""<br>To fix the connect move up SET_NONBLOCKING(sock) before connect()<br clear="none" id="yui_3_16_0_ym19_1_1479771400257_822044">then catch the EINPROGRESS from connect<br clear="none" id="yui_3_16_0_ym19_1_1479771400257_822045">and call enif_select(.., ERL_NIF_SELECT_WRITE, ..)<br clear="none" id="yui_3_16_0_ym19_1_1479771400257_822046">return to Erlang and wait for read_output message<br clear="none" id="yui_3_16_0_ym19_1_1479771400257_822047">and then call some continue_connect_nif for example.<br clear="none" id="yui_3_16_0_ym19_1_1479771400257_822048"><br clear="none" id="yui_3_16_0_ym19_1_1479771400257_822049"><br clear="none" id="yui_3_16_0_ym19_1_1479771400257_822050">I did some runs on the loopback and it looked promising,<br clear="none" id="yui_3_16_0_ym19_1_1479771400257_822051">almost twice the throughput if I remember correctly.<br clear="none" id="yui_3_16_0_ym19_1_1479771400257_822052">But, sverk_tcp is a very stripped down implementation<br clear="none" id="yui_3_16_0_ym19_1_1479771400257_822053">without all the features that gen_tcp provides, so I wouldn't<br clear="none" id="yui_3_16_0_ym19_1_1479771400257_822054">get overly excited about that.<br>"""<br><br><br><br><br></div></div></div></div></div></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Friday, December 2, 2016 2:35 PM, Max Lapshin <max.lapshin@gmail.com> wrote:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv2528275846"><div><div dir="ltr"><div class="yiv2528275846gmail_extra">Well, we can try your sverk_tcp on our test installation with  1gbps of input.</div><div class="yiv2528275846gmail_extra"><br clear="none"></div><div class="yiv2528275846gmail_extra">But I'm a bit afraid of blocking connect. </div></div></div></div><br><div class="yqt3948812652" id="yqtfd26413">_______________________________________________<br clear="none">erlang-questions mailing list<br clear="none"><a shape="rect" ymailto="mailto:erlang-questions@erlang.org" href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br clear="none"><a shape="rect" href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br clear="none"></div><br><br></div>  </div> </div>  </div></div></body></html>