<div style="white-space:pre-wrap">hackney is supporting local sockets if you need an http client. hackney:get<<"http+unix://...">><br><br>- benoît</div><br><div class="gmail_quote"><div dir="ltr">On Tue, 18 Oct 2016 at 09:00, Taras Shapovalov <<a href="mailto:shapovalovts@gmail.com">shapovalovts@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">Thank you, guys, for the comments.<br class="gmail_msg"><br class="gmail_msg"></div>I am still staggelling with gen_tcp. It is clear how to use gen_udp for this purpose, but not clear what to do with gen_tcp.<br class="gmail_msg"><br class="gmail_msg">[taras@dev1 ~]$ erl<br class="gmail_msg">Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]</div></div><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"><br class="gmail_msg">Eshell V8.1 (abort with ^G)<br class="gmail_msg"></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_msg">1> {ok, S1} = gen_tcp:connect({local, <<"/var/run/docker.sock">>}, 0, [local]). <br class="gmail_msg">{ok,#Port<0.448>}<br class="gmail_msg">3> gen_tcp:send(S1, <<"http:/containers/json">>). <br class="gmail_msg">ok<br class="gmail_msg">4> A = gen_tcp:recv(S1,0). <br class="gmail_msg">{error,einval}<br class="gmail_msg">5> <br class="gmail_msg"><br class="gmail_msg"></div>I don't get how to receive an answer from TCP unix socket. <br class="gmail_msg">Should I create one more socket (to listen it) and somehow link them?<br class="gmail_msg"><div class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><span class="m_2067317432389577654gmail- gmail_msg"></span><br class="gmail_msg"><span class="m_2067317432389577654gmail- gmail_msg"></span><blockquote class="gmail_quote gmail_msg" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="m_2067317432389577654gmail- gmail_msg">
</span>I should pass all options through to gen_tcp, so it is not impossible that<br class="gmail_msg">
it can handle the 'local' address family. Give it a try!<br class="gmail_msg"></blockquote><div class="gmail_msg"><br class="gmail_msg"></div></div></div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><div class="gmail_msg">Would be nice to see it in httpc as well!<br class="gmail_msg"></div><div class="gmail_msg"> <br class="gmail_msg"></div></div>Best regards,<br class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_extra gmail_msg">Taras<br class="gmail_msg"></div></div></div>
_______________________________________________<br class="gmail_msg">
erlang-questions mailing list<br class="gmail_msg">
<a href="mailto:erlang-questions@erlang.org" class="gmail_msg" target="_blank">erlang-questions@erlang.org</a><br class="gmail_msg">
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" class="gmail_msg" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br class="gmail_msg">
</blockquote></div>