Skip to content

Instantly share code, notes, and snippets.

@bols-blue
Last active February 28, 2017 04:55
Show Gist options
  • Save bols-blue/1458aaecdd0060af466a03d49061aab2 to your computer and use it in GitHub Desktop.
Save bols-blue/1458aaecdd0060af466a03d49061aab2 to your computer and use it in GitHub Desktop.
elixir で Unix Domain Socket を読み書きする ref: http://qiita.com/bols_blue/items/efe817413ec3c38c18bd
{:ok,socket}= :gen_udp.open(0, [{:ifaddr, {:local, "/tmp/testsockin"}}])
:gen_udp.send(socket,{:local, "/tmp/testsockin"}, 0, "test test \r\n")
receive do
tmp ->
IO.inspect tmp
after 3000 ->
IO.puts "time out"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment