Azolo / websockex

An Elixir Websocket Client
MIT License
519 stars 100 forks source link

nxdomain error with inet6 address #92

Open ryan-senn opened 3 years ago

ryan-senn commented 3 years ago

Hi,

I am trying to connect to an inet6 address but getting the following error: %WebSockex.ConnError{original: :nxdomain}

This is my start_link function:

  def start_link(state) do
    WebSockex.start_link("ws://[::1]:7078", __MODULE__, state)
  end

Interestingly, I was getting the same error with Finch & Mint, but I can send down the following config to make it work: {Finch, name: MyFinch, pools: %{default: [conn_opts: [transport_opts: [inet6: true]]]}}

Could we add the same option for WebSockex? Basically, I need a way to push options down to line 156 in conn.ex.

In the meanwhile I have forked the project and hardcoded [:inet6, :binary, active: false, packet: 0] for my needs.

Thanks!

I am trying to connect to a nano node: https://docs.nano.org/integration-guides/websockets