[erlang-questions] Unix Domain Sockets in v19
Taras Shapovalov
shapovalovts@REDACTED
Sun Oct 16 19:34:22 CEST 2016
Hey guys,
I would like to try the experimental feature of v19 -- unix sockets, but
cannot get how it should be used. For example, if I send some request to
docker with gen_udp, then I will get {error,eprototype}:
[taras@REDACTED ~]$ erl
Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:4:4] [async-threads:10]
[kernel-poll:false]
Eshell V8.1 (abort with ^G)
1> {ok, Sockout} = gen_udp:open(0, [{ifaddr, {local, "/tmp/testsockout"}}]).
{ok,#Port<0.413>}
2> gen_udp:send(Sockout, {local, "/var/run/docker.sock"}, 0,
"http:/containers/json").
{error,eprototype}
3>
The socket is available and accessable by the user. Say, this works fine:
curl --unix-socket /var/run/docker.sock http:/containers/json
Any idea what is going wrong there?
I will appreciate if someone points me to any documentation (I know the
final description of the feature is not ready for now, but maybe there is
some draft already exists?).
Also do you know if httpc module supports the unix sockets since 19.0? If
yes, how to do the same with httpc?
Best regards,
Taras
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20161016/604d2e7d/attachment.htm>
More information about the erlang-questions
mailing list